00001 #ifndef __cmt_branch_h__ 00002 #define __cmt_branch_h__ 00003 00004 #include "cmt_parser.h" 00005 #include "cmt_system.h" 00006 00007 class Branch 00008 { 00009 public: 00010 typedef cmt_vector<Branch> BranchVector; 00011 00012 static void action (const CmtSystem::cmt_string_vector& words); 00013 static Branch* find (const cmt_string& name); 00014 static void add (const cmt_string& name); 00015 static void print_all (PrintMode mode); 00016 static void clear_all (); 00017 static BranchVector& branches (); 00018 00019 public: 00020 Branch (); 00021 ~Branch (); 00022 const cmt_string& name () const; 00023 void print (PrintMode mode) const; 00024 00025 private: 00026 cmt_string m_name; 00027 }; 00028 00029 #endif