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_use.h" |
---|
13 | #include "cmt_symbol.h" |
---|
14 | #include "cmt_project.h" |
---|
15 | #include "cmt_cmtpath_pattern.h" |
---|
16 | |
---|
17 | class Database |
---|
18 | { |
---|
19 | public: |
---|
20 | |
---|
21 | static Database& instance (); |
---|
22 | |
---|
23 | static void clear (); |
---|
24 | |
---|
25 | static Branch::BranchVector& branches (); |
---|
26 | static Constituent::ConstituentVector& constituents (); |
---|
27 | static Fragment::FragmentVector& fragments (); |
---|
28 | static Group::GroupVector& groups (); |
---|
29 | static Language::LanguageVector& languages (); |
---|
30 | |
---|
31 | static Package::PackageVector& packages (); |
---|
32 | static Package::PackageMap& package_map (); |
---|
33 | |
---|
34 | static Pattern::PatternVector& patterns (); |
---|
35 | |
---|
36 | static PatternList::PatternListMap& pattern_list_map (); |
---|
37 | static PatternList::PatternListVector& pattern_lists (); |
---|
38 | |
---|
39 | static Use::UseVector& all_uses (); |
---|
40 | static Use::UsePtrVector& uses (); |
---|
41 | |
---|
42 | static Symbol::SymbolVector& symbols (); |
---|
43 | static Symbol::SymbolMap& symbol_map (); |
---|
44 | |
---|
45 | static Tag::TagVector& all_tags (); |
---|
46 | static Tag::TagPtrVector& tags (); |
---|
47 | static Tag::TagMap& tag_map (); |
---|
48 | |
---|
49 | static Project::ProjectVector& projects (); |
---|
50 | |
---|
51 | static CmtPathPattern::CmtPathPatternVector& cmtpath_patterns (); |
---|
52 | |
---|
53 | private: |
---|
54 | |
---|
55 | Database (); |
---|
56 | |
---|
57 | Branch::BranchVector m_branches; |
---|
58 | Constituent::ConstituentVector m_constituents; |
---|
59 | Fragment::FragmentVector m_fragments; |
---|
60 | Group::GroupVector m_groups; |
---|
61 | Language::LanguageVector m_languages; |
---|
62 | |
---|
63 | Package::PackageVector m_packages; |
---|
64 | Package::PackageMap m_package_map; |
---|
65 | |
---|
66 | Pattern::PatternVector m_patterns; |
---|
67 | |
---|
68 | PatternList::PatternListMap m_pattern_list_map; |
---|
69 | PatternList::PatternListVector m_pattern_lists; |
---|
70 | |
---|
71 | Use::UseVector m_all_uses; |
---|
72 | Use::UsePtrVector m_uses; |
---|
73 | Symbol::SymbolVector m_symbols; |
---|
74 | Symbol::SymbolMap m_symbol_map; |
---|
75 | Tag::TagVector m_all_tags; |
---|
76 | Tag::TagPtrVector m_tags; |
---|
77 | Tag::TagMap m_tag_map; |
---|
78 | Project::ProjectVector m_projects; |
---|
79 | |
---|
80 | CmtPathPattern::CmtPathPatternVector m_cmtpath_patterns; |
---|
81 | |
---|
82 | }; |
---|
83 | |
---|
84 | #endif |
---|