00001 #ifndef TREENODE_H 00002 #define TREENODE_H 00003 #include <vector> 00004 #include <string> 00008 class TreeNode { 00009 public: 00010 TreeNode(string name,string value,vector<TreeNode *> * childVec); 00011 TreeNode(string name,string value); 00012 TreeNode(); 00016 vector<TreeNode*> * children; 00020 string name; 00024 string value; 00028 vector<TreeNode*> * getChildren(); 00032 string getName(); 00036 string getValue(); 00043 TreeNode * getChild(const string & name); 00047 bool existChild(const string & name); //Does a subchild exist? 00051 virtual ~TreeNode(); 00055 void clearChildren(); 00056 private: 00057 void init(string name,string value,vector<TreeNode*> * vecChild); 00058 00059 }; 00060 #endif