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

# Database Class Reference

`#include <cmt_database.h>`

List of all members.

## Public Types
enum | keys { key_branch = 0x1, key_constituent = 0x2, key_fragment = 0x4, key_group = 0x8, key_language = 0x10, key_pattern = 0x20, key_selector = 0x40, key_tag = 0x80, key_use = 0x100, key_symbol = 0x200, key_all = 0xFFFF }
## Static Public Methods
Database& | instance ()
void | dump (const cmt_string& title, keys key_set = key_all)
void | clear ()
Branch::BranchVector& | branches ()
Constituent::ConstituentVector& | constituents ()
Fragment::FragmentVector& | fragments ()
Group::GroupVector& | groups ()
Language::LanguageVector& | languages ()
Pattern::PatternVector& | patterns ()
Tag::TagVector& | all_tags ()
Tag::TagPtrVector& | tags ()
Use::UseVector& | all_uses ()
Use::UsePtrVector& | uses ()
Symbol::SymbolVector& | symbols ()
## Private Methods
| Database ()
## Private Attributes
Branch::BranchVector | m_branches
Constituent::ConstituentVector | m_constituents
Fragment::FragmentVector | m_fragments
Group::GroupVector | m_groups
Language::LanguageVector | m_languages
Pattern::PatternVector | m_patterns
Tag::TagVector | m_all_tags
Tag::TagPtrVector | m_tags
Use::UseVector | m_all_uses
Use::UsePtrVector | m_uses
Symbol::SymbolVector | m_symbols

## Member Enumeration Documentation

enum Database::keys

  | Enumeration values:
  key_branch |
  key_constituent |
  key_fragment |
  key_group |
  key_language |
  key_pattern |
  key_selector |
  key_tag |
  key_use |
  key_symbol |
  key_all |
Definition at line 20 of file cmt_database.h.
    00021   {
    00022     key_branch      = 0x1,
    00023     key_constituent = 0x2,
    00024     key_fragment    = 0x4,
    00025     key_group       = 0x8,
    00026     key_language    = 0x10,
    00027     key_pattern     = 0x20,
    00028     key_selector    = 0x40,    // obsolete
    00029     key_tag         = 0x80,
    00030     key_use         = 0x100,
    00031     key_symbol      = 0x200,
    00032     key_all         = 0xFFFF
    00033   }

## Constructor & Destructor Documentation

Database::Database ( | )`[private]`

| Definition at line 166 of file cmt_database.cxx.
    00167 {
    00168 }

## Member Function Documentation

Tag::TagVector & Database::all_tags ( | )`[static]`

| Definition at line 131 of file cmt_database.cxx. Referenced by Tag::all_tags().
    00132 {
    00133   static Database& db = instance ();
    00134
    00135   return (db.m_all_tags);
    00136 }

Use::UseVector & Database::all_uses ( | )`[static]`

| Definition at line 145 of file cmt_database.cxx. Referenced by Use::all_uses().
    00146 {
    00147   static Database& db = instance ();
    00148
    00149   return (db.m_all_uses);
    00150 }

Branch::BranchVector & Database::branches ( | )`[static]`

| Definition at line 89 of file cmt_database.cxx. Referenced by Branch::branches().
    00090 {
    00091   static Database& db = instance ();
    00092
    00093   return (db.m_branches);
    00094 }

void Database::clear ( | )`[static]`

| Definition at line 76 of file cmt_database.cxx. Referenced by Cmt::clear().
    00077 {
    00078   Branch::clear_all ();
    00079   Constituent::clear_all ();
    00080   Fragment::clear_all ();
    00081   Group::clear_all ();
    00082   Language::clear_all ();
    00083   Pattern::clear_all ();
    00084   Tag::clear_all ();
    00085   Use::clear_all ();
    00086   Symbol::clear_all ();
    00087 }

Constituent::ConstituentVector & Database::constituents ( | )`[static]`

| Definition at line 96 of file cmt_database.cxx. Referenced by Constituent::constituents().
    00097 {
    00098   static Database& db = instance ();
    00099
    00100   return (db.m_constituents);
    00101 }

void Database::dump ( | const cmt_string & title,
| keys key_set = key_all )`[static]`

| Definition at line 47 of file cmt_database.cxx.
    00049 {
    00050   static Database& db = instance ();
    00051   static dumper<Branch> branch_dumper;
    00052   static dumper<Constituent> constituent_dumper;
    00053   static dumper<Fragment> fragment_dumper;
    00054   static dumper<Group> group_dumper;
    00055   static dumper<Language> language_dumper;
    00056   static dumper<Pattern> pattern_dumper;
    00057   static dumper<Tag> tag_dumper;
    00058   static dumper<Use> use_dumper;
    00059   static dumper<Symbol> symbol_dumper;
    00060
    00061   cout << "Database>-------------" << title << endl;
    00062
    00063   if ((key_set & key_branch) != 0) branch_dumper.dump_vector (db.m_branches, "Branches");
    00064   if ((key_set & key_constituent) != 0) constituent_dumper.dump_vector (db.m_constituents, "Constituents");
    00065   if ((key_set & key_fragment) != 0) fragment_dumper.dump_vector (db.m_fragments, "Fragments");
    00066   if ((key_set & key_group) != 0) group_dumper.dump_vector (db.m_groups, "Groups");
    00067   if ((key_set & key_language) != 0) language_dumper.dump_vector (db.m_languages, "Languages");
    00068   if ((key_set & key_pattern) != 0) pattern_dumper.dump_vector (db.m_patterns, "Patterns");
    00069   if ((key_set & key_tag) != 0) tag_dumper.dump_vector (db.m_all_tags, "AllTags");
    00070   if ((key_set & key_use) != 0) use_dumper.dump_vector (db.m_all_uses, "Uses");
    00071   if ((key_set & key_symbol) != 0) symbol_dumper.dump_vector (db.m_symbols, "Symbols");
    00072
    00073   cout << "Database>-------------" << endl;
    00074 }

Fragment::FragmentVector & Database::fragments ( | )`[static]`

| Definition at line 103 of file cmt_database.cxx. Referenced by Fragment::fragments().
    00104 {
    00105   static Database& db = instance ();
    00106
    00107   return (db.m_fragments);
    00108 }

Group::GroupVector & Database::groups ( | )`[static]`

| Definition at line 110 of file cmt_database.cxx. Referenced by Group::groups().
    00111 {
    00112   static Database& db = instance ();
    00113
    00114   return (db.m_groups);
    00115 }

Database & Database::instance ( | )`[static]`

| Definition at line 40 of file cmt_database.cxx. Referenced by Tag::all_tags(), all_tags(), Use::all_uses(), all_uses(), branches(), Branch::branches(), constituents(), Constituent::constituents(), dump(), Fragment::fragments(), fragments(), Group::groups(), groups(), Language::languages(), languages(), Pattern::patterns(), patterns(), Symbol::symbols(), symbols(), Tag::tags(), tags(), Use::uses(), and uses().
    00041 {
    00042   static Database db;
    00043
    00044   return (db);
    00045 }

Language::LanguageVector & Database::languages ( | )`[static]`

| Definition at line 117 of file cmt_database.cxx. Referenced by Language::languages().
    00118 {
    00119   static Database& db = instance ();
    00120
    00121   return (db.m_languages);
    00122 }

Pattern::PatternVector & Database::patterns ( | )`[static]`

| Definition at line 124 of file cmt_database.cxx. Referenced by Pattern::patterns().
    00125 {
    00126   static Database& db = instance ();
    00127
    00128   return (db.m_patterns);
    00129 }

Symbol::SymbolVector & Database::symbols ( | )`[static]`

| Definition at line 159 of file cmt_database.cxx. Referenced by Symbol::symbols().
    00160 {
    00161   static Database& db = instance ();
    00162
    00163   return (db.m_symbols);
    00164 }

Tag::TagPtrVector & Database::tags ( | )`[static]`

| Definition at line 138 of file cmt_database.cxx. Referenced by Tag::tags().
    00139 {
    00140   static Database& db = instance ();
    00141
    00142   return (db.m_tags);
    00143 }

Use::UsePtrVector & Database::uses ( | )`[static]`

| Definition at line 152 of file cmt_database.cxx. Referenced by Use::uses().
    00153 {
    00154   static Database& db = instance ();
    00155
    00156   return (db.m_uses);
    00157 }

## Member Data Documentation

Tag::TagVector Database::m_all_tags`[private]`

| Definition at line 62 of file cmt_database.h.

Use::UseVector Database::m_all_uses`[private]`

| Definition at line 64 of file cmt_database.h.

Branch::BranchVector Database::m_branches`[private]`

| Definition at line 56 of file cmt_database.h.

Constituent::ConstituentVector Database::m_constituents`[private]`

| Definition at line 57 of file cmt_database.h.

Fragment::FragmentVector Database::m_fragments`[private]`

| Definition at line 58 of file cmt_database.h.

Group::GroupVector Database::m_groups`[private]`

| Definition at line 59 of file cmt_database.h.

Language::LanguageVector Database::m_languages`[private]`

| Definition at line 60 of file cmt_database.h.

Pattern::PatternVector Database::m_patterns`[private]`

| Definition at line 61 of file cmt_database.h.

Symbol::SymbolVector Database::m_symbols`[private]`

| Definition at line 66 of file cmt_database.h.

Tag::TagPtrVector Database::m_tags`[private]`

| Definition at line 63 of file cmt_database.h.

Use::UsePtrVector Database::m_uses`[private]`

| Definition at line 65 of file cmt_database.h.

The documentation for this class was generated from the following files:

- cmt_database.h
- cmt_database.cxx