Rev | Line | |
---|
[1] | 1 | #ifndef __cmt_tag_h__ |
---|
| 2 | #define __cmt_tag_h__ |
---|
| 3 | |
---|
| 4 | #include "cmt_parser.h" |
---|
| 5 | #include "cmt_system.h" |
---|
| 6 | #include "cmt_use.h" |
---|
| 7 | |
---|
| 8 | class Tag |
---|
| 9 | { |
---|
| 10 | public: |
---|
| 11 | typedef cmt_vector<Tag> TagVector; |
---|
| 12 | typedef cmt_vector<Tag*> TagPtrVector; |
---|
| 13 | |
---|
| 14 | static void action (const CmtSystem::cmt_string_vector& words, Use* use); |
---|
| 15 | static void action_exclude (const CmtSystem::cmt_string_vector& words, Use* use); |
---|
| 16 | static Tag* find (const cmt_string& name); |
---|
| 17 | static Tag* add (const cmt_string& name, int priority, |
---|
| 18 | const cmt_string& context, Use* use = 0); |
---|
| 19 | static int tag_number (); |
---|
| 20 | static Tag* tag (int index); |
---|
| 21 | static void unmark_all (); |
---|
| 22 | static void restore_tree (); |
---|
| 23 | static void clear_all (); |
---|
| 24 | static TagVector& all_tags (); |
---|
| 25 | static TagPtrVector& tags (); |
---|
| 26 | static Tag* get_default (); |
---|
| 27 | |
---|
| 28 | public: |
---|
| 29 | Tag (); |
---|
| 30 | ~Tag (); |
---|
| 31 | void clear (); |
---|
| 32 | void add_tag_ref (Tag* ref); |
---|
| 33 | void add_tag_exclude (Tag* ref); |
---|
| 34 | void unmark (); |
---|
| 35 | void mark (); |
---|
| 36 | void show (bool quiet) const; |
---|
| 37 | bool is_selected () const; |
---|
| 38 | |
---|
| 39 | cmt_string name; |
---|
| 40 | TagPtrVector tag_refs; |
---|
| 41 | TagPtrVector tag_excludes; |
---|
| 42 | int priority; |
---|
| 43 | Use* def_use; |
---|
| 44 | Use* set_use; |
---|
| 45 | cmt_string context; |
---|
| 46 | bool selected; |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.