cmt_tag.h Source File

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

# cmt_tag.h

Go to the documentation of this file.

    00001 #ifndef __cmt_tag_h__
    00002 #define __cmt_tag_h__
    00003
    00004 #include "cmt_parser.h"
    00005 #include "cmt_system.h"
    00006 #include "cmt_use.h"
    00007
    00008 class Tag
    00009 {
    00010 public:
    00011   typedef cmt_vector<Tag> TagVector;
    00012   typedef cmt_vector<Tag*> TagPtrVector;
    00013
    00014   static void action (const CmtSystem::cmt_string_vector& words, Use* use);
    00015   static void action_exclude (const CmtSystem::cmt_string_vector& words, Use* use);
    00016   static Tag* find (const cmt_string& name);
    00017   static Tag* add (const cmt_string& name, int priority,
    00018                    const cmt_string& context, Use* use = 0);
    00019   static int tag_number ();
    00020   static Tag* tag (int index);
    00021   static void unmark_all ();
    00022   static void restore_tree ();
    00023   static void clear_all ();
    00024   static TagVector& all_tags ();
    00025   static TagPtrVector& tags ();
    00026   static Tag* get_default ();
    00027
    00028 public:
    00029   Tag ();
    00030   ~Tag ();
    00031   void clear ();
    00032   void add_tag_ref (Tag* ref);
    00033   void add_tag_exclude (Tag* ref);
    00034   void unmark ();
    00035   void mark ();
    00036   void show_definition (bool quiet) const;
    00037   void show (bool quiet) const;
    00038   bool is_selected () const;
    00039
    00040   cmt_string name;
    00041   TagPtrVector tag_refs;
    00042   TagPtrVector tag_excludes;
    00043   int priority;
    00044   Use* def_use;
    00045   Use* set_use;
    00046   cmt_string context;
    00047   bool selected;
    00048 };
    00049
    00050 #endif