source: CMT/v1r10p20011126/src/cmt_database.h @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 1.7 KB
Line 
1#ifndef __cmt_database_h__
2#define __cmt_database_h__
3
4#include "cmt_vector.h"
5
6#include "cmt_branch.h"
7#include "cmt_constituent.h"
8#include "cmt_fragment.h"
9#include "cmt_group.h"
10#include "cmt_language.h"
11#include "cmt_pattern.h"
12#include "cmt_tag.h"
13#include "cmt_use.h"
14#include "cmt_symbol.h"
15
16class Database
17{
18public:
19
20  typedef enum
21  {
22    key_branch      = 0x1,
23    key_constituent = 0x2,
24    key_fragment    = 0x4,
25    key_group       = 0x8,
26    key_language    = 0x10,
27    key_pattern     = 0x20,
28    key_selector    = 0x40,    // obsolete
29    key_tag         = 0x80,
30    key_use         = 0x100,
31    key_symbol      = 0x200,
32    key_all         = 0xFFFF
33  } keys;
34
35  static Database& instance ();
36
37  static void dump (const cmt_string& title, keys key_set = key_all);
38  static void clear ();
39
40  static Branch::BranchVector& branches ();
41  static Constituent::ConstituentVector& constituents ();
42  static Fragment::FragmentVector& fragments ();
43  static Group::GroupVector& groups ();
44  static Language::LanguageVector& languages ();
45  static Pattern::PatternVector& patterns ();
46  static Tag::TagVector& all_tags ();
47  static Tag::TagPtrVector& tags ();
48  static Use::UseVector& all_uses ();
49  static Use::UsePtrVector& uses ();
50  static Symbol::SymbolVector& symbols ();
51
52private:
53
54  Database ();
55
56  Branch::BranchVector m_branches;
57  Constituent::ConstituentVector m_constituents;
58  Fragment::FragmentVector m_fragments;
59  Group::GroupVector m_groups;
60  Language::LanguageVector m_languages;
61  Pattern::PatternVector m_patterns;
62  Tag::TagVector m_all_tags;
63  Tag::TagPtrVector m_tags;
64  Use::UseVector m_all_uses;
65  Use::UsePtrVector m_uses;
66  Symbol::SymbolVector m_symbols;
67
68};
69
70#endif
Note: See TracBrowser for help on using the repository browser.