diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-08-09 07:49:38 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-08-09 07:49:38 +0000 |
commit | 3b036371ae3edebb53fd878ddc8c916e78ee1279 (patch) | |
tree | 44506f23a25fcd511783023f4f28eb1a4a45cab1 /src/configmanager.h | |
parent | 97e6e0c3bce47da037ce4bbaeb977120f0ce6f5a (diff) | |
download | libbu++-3b036371ae3edebb53fd878ddc8c916e78ee1279.tar.gz libbu++-3b036371ae3edebb53fd878ddc8c916e78ee1279.tar.bz2 libbu++-3b036371ae3edebb53fd878ddc8c916e78ee1279.tar.xz libbu++-3b036371ae3edebb53fd878ddc8c916e78ee1279.zip |
This may work, now the filenames just need to be changed.
Diffstat (limited to '')
-rw-r--r-- | src/configmanager.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/configmanager.h b/src/configmanager.h index d5ecd7d..b60c73a 100644 --- a/src/configmanager.h +++ b/src/configmanager.h | |||
@@ -1,32 +1,24 @@ | |||
1 | #ifndef CONFIG_MANAGER_H | 1 | #ifndef CONFIG_MANAGER_BASE_H |
2 | #define CONFIG_MANAGER_H | 2 | #define CONFIG_MANAGER_BASE_H |
3 | 3 | ||
4 | #include "config.h" | ||
5 | #include "singleton.h" | ||
6 | #include <string> | 4 | #include <string> |
5 | #include <list> | ||
7 | 6 | ||
8 | class ConfigManager : public Singleton<ConfigManager> | 7 | class ConfigManagerBase |
9 | { | 8 | { |
10 | friend class Singleton<ConfigManager>; | 9 | public: |
11 | protected: | 10 | ConfigManagerBase(); |
12 | ConfigManager(); | 11 | ~ConfigManagerBase(); |
13 | ~ConfigManager(); | ||
14 | 12 | ||
15 | public: | 13 | public: |
14 | void addSearchPath( const std::string &sPath ); | ||
16 | void loadConfig( const char *lpProfile="default" ); | 15 | void loadConfig( const char *lpProfile="default" ); |
17 | 16 | ||
18 | private: | 17 | private: |
19 | bool parseConfig( const char *lpFileName, const char *lpProfile ); | 18 | bool parseConfig( const char *lpFileName, const char *lpProfile ); |
20 | bool processProfile( class XmlNode *pBase ); | 19 | virtual bool processProfile( class XmlNode *pBase )=0; |
21 | |||
22 | public: // Getters, these should be moved if we make this a base class... | ||
23 | std::string &getDefLanguage(); | ||
24 | std::string &getBackend(); | ||
25 | 20 | ||
26 | private: // Properties, these should be moved if we make this a base class... | 21 | std::list<std::string> lSearchPath; |
27 | std::string sDefLang; /**< The default language for all operations. */ | ||
28 | std::string sBackend; /**< The backend database plugin name. */ | ||
29 | XmlNode *pBackend; /**< The xml snippet describing the backend. */ | ||
30 | }; | 22 | }; |
31 | 23 | ||
32 | #endif | 24 | #endif |