Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

node.h

Go to the documentation of this file.
00001 #ifndef node_h
00002 #define node_h
00003 
00004 #include "menusystem.h"
00005 
00007 class MenuSystem::Node
00008 {
00009  public:
00010   MenuBase tag;
00011   Node *parent;
00012   
00013   typedef std::list<Node*> node_list;
00014   typedef std::list<Node*>::iterator node_list_it;
00015   
00016   node_list childs;
00017 
00018   std::string path;   
00019   std::string subdir; 
00020   
00021   Node( Node *parent, MenuBase tag );
00022 
00024   bool is_item() const { return "item" == tag.get_tag_type(); } 
00025 
00027   bool is_menu() const { return "menu" == tag.get_tag_type(); }
00028 
00030   void add_child( Node *node );
00031 
00033   bool find_node( std::string path, Node *&node );
00034 
00036   bool find_node_rec( std::string path, Node *parent, Node *&node );
00037 
00039 
00040   bool find_node_rec( std::string path, Node *&node )
00041     { return find_node_rec( path, this, node ); }
00042 };
00043 
00044 
00045 #endif

Generated on Tue Nov 20 02:19:52 2001 for Leo<HTML> by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001