Added vimicxx_conf
[vimicxx.git] / src / vimicxx_conf.h
blob5b25bad7a66d91a7e33eea0525ed704679ed282e
1 /*******************************************************************************
2 ********************************************************************************
4 Copyright (c) 2008 Ahmed S. Badran
6 Licensed under the FreeBSD License (see LICENSE)
8 Filename: vimicxx_conf.h
9 Description: Implements vimicxx configuration file policy.
10 Created: 09/07/2008 05:03:11 PM PDT
11 Author: Ahmed S. Badran (Ahmed B.), ahmed.badran@gmail.com
13 ********************************************************************************
14 *******************************************************************************/
15 #ifndef VIMICXX_CONF_INC
16 #define VIMICXX_CONF_INC
17 #include <string>
18 #include <vector>
19 class configfile;
20 class vimicxx_conf
22 public:
23 vimicxx_conf(const std::string& vimicxx_dir);
24 static const std::string err_to_string(int e);
25 int add_project(const std::string& prj_name, const std::string&
26 prj_path, const std::vector<std::string>& ext_list);
27 bool get_project_path(const std::string& prj, std::string* path) const;
28 bool get_project_cache(const std::string& prj, std::string* cache)
29 const;
30 bool get_project_index(const std::string& prj, std::string* index)
31 const;
32 bool get_project_flist(const std::string& prj, std::string* flist)
33 const;
34 bool get_project_cscope_db(const std::string& prj, std::string*
35 cscope_db) const;
36 ~vimicxx_conf();
37 private:
38 enum {
39 Ok,
40 Err_DuplicatePrjName,
41 Err_MissingPrjPath
43 private:
44 configfile* conf;
45 const std::string vimicxx_home;
46 const std::string conf_path;
48 private:
49 vimicxx_conf(const vimicxx_conf&);
50 const vimicxx_conf& operator=(const vimicxx_conf&);
52 #endif // ----- #ifndef VIMICXX_CONF_INC -----