Line | |
---|
1 | #ifndef __cmt_project_h__ |
---|
2 | #define __cmt_project_h__ |
---|
3 | |
---|
4 | #include "cmt_parser.h" |
---|
5 | #include "cmt_system.h" |
---|
6 | |
---|
7 | class Use; |
---|
8 | |
---|
9 | class Project |
---|
10 | { |
---|
11 | public: |
---|
12 | |
---|
13 | typedef cmt_vector<Project> ProjectVector; |
---|
14 | |
---|
15 | static Project* find (const cmt_string& name); |
---|
16 | static Project* add (const cmt_string& name, Use* use); |
---|
17 | |
---|
18 | static void action (const CmtSystem::cmt_string_vector& words, Use* use); |
---|
19 | |
---|
20 | static ProjectVector& projects (); |
---|
21 | static void clear_all (); |
---|
22 | static void show_all (); |
---|
23 | |
---|
24 | static Project& get_current_project (); |
---|
25 | static Project& get_default_project (); |
---|
26 | static void set_current_project (Project* project); |
---|
27 | |
---|
28 | public: |
---|
29 | |
---|
30 | Project (); |
---|
31 | |
---|
32 | const cmt_string& name () const; |
---|
33 | void set (const cmt_string& new_name, Use* use); |
---|
34 | void clear (); |
---|
35 | |
---|
36 | Project& operator = (const Project& other); |
---|
37 | bool operator == (const cmt_string& name) const; |
---|
38 | bool operator != (const cmt_string& name) const; |
---|
39 | |
---|
40 | const cmt_string& get_name () const; |
---|
41 | |
---|
42 | void show () const; |
---|
43 | |
---|
44 | private: |
---|
45 | cmt_string m_name; |
---|
46 | Use* m_use; |
---|
47 | }; |
---|
48 | |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.