core/vgui/vgui_find.h
Go to the documentation of this file.
00001 // This is core/vgui/vgui_find.h
00002 #ifndef vgui_find_h_
00003 #define vgui_find_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \author  fsm
00010 // \brief   Functions to search for tableaux in the tableau hierarchy.
00011 
00012 #include <vcl_string.h>
00013 #include <vgui/vgui_tableau_sptr.h>
00014 
00015 //: Search for a tableau by type in the hierarchy.
00016 //  If direction_down is true, it will search below param
00017 //  start. Otherwise, it will search above param start. Returns a
00018 //  null pointer if a matching tableau is not found.
00019 vgui_tableau_sptr vgui_find_by_type_name(vgui_tableau_sptr const& start, vcl_string const &tn, bool direction_down);
00020 
00021 //: Search for a tableau by type in the hierarchy.
00022 //  This is a convenience function. It calls vgui_find_by_type_name().
00023 //  \sa vgui_find_by_type_name()
00024 inline
00025 vgui_tableau_sptr vgui_find_below_by_type_name(vgui_tableau_sptr const& start, vcl_string const &tn)
00026 { return vgui_find_by_type_name(start, tn, true); }
00027 
00028 //: Search for a tableau by type in the hierarchy.
00029 //  This is a convenience function. It calls vgui_find_by_type_name().
00030 //  \sa vgui_find_by_type_name()
00031 inline
00032 vgui_tableau_sptr vgui_find_above_by_type_name(vgui_tableau_sptr const& start, vcl_string const &tn)
00033 { return vgui_find_by_type_name(start, tn, false); }
00034 
00035 
00036 //: Search for a tableau by name in the hierarchy.
00037 //  If direction_down is true, it will search below param
00038 //  start. Otherwise, it will search above param start. Returns a
00039 //  null pointer if a matching tableau is not found.
00040 vgui_tableau_sptr vgui_find_by_name(vgui_tableau_sptr const& start, vcl_string const &name, bool direction_down);
00041 
00042 //: Search for a tableau by name in the hierarchy.
00043 //  This is a convenience function. It calls vgui_find_by_name().
00044 //  \sa vgui_find_by_name()
00045 inline
00046 vgui_tableau_sptr vgui_find_below_by_name(vgui_tableau_sptr const& start, vcl_string const &name)
00047 { return vgui_find_by_name(start, name, true); }
00048 
00049 //: Search for a tableau by name in the hierarchy.
00050 //  This is a convenience function. It calls vgui_find_by_name().
00051 //  \sa vgui_find_by_name()
00052 inline
00053 vgui_tableau_sptr vgui_find_above_by_name(vgui_tableau_sptr const& start, vcl_string const &name)
00054 { return vgui_find_by_name(start, name, false); }
00055 
00056 #endif // vgui_find_h_