diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2006-08-09 06:08:59 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2006-08-09 06:08:59 +0000 |
| commit | 97e6e0c3bce47da037ce4bbaeb977120f0ce6f5a (patch) | |
| tree | ff5880313318001005eb27a1904e4331c1d81f06 /src/configmanager.h | |
| parent | 62bee6bf7f2be96c331cdb334d5a00067a67591e (diff) | |
| download | libbu++-97e6e0c3bce47da037ce4bbaeb977120f0ce6f5a.tar.gz libbu++-97e6e0c3bce47da037ce4bbaeb977120f0ce6f5a.tar.bz2 libbu++-97e6e0c3bce47da037ce4bbaeb977120f0ce6f5a.tar.xz libbu++-97e6e0c3bce47da037ce4bbaeb977120f0ce6f5a.zip | |
The start of the configmanager to libbu++, they are good, but make congo not
build now, for a while, and don't actually work yet, so just don't use this
revision of libbu++.
Diffstat (limited to 'src/configmanager.h')
| -rw-r--r-- | src/configmanager.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/configmanager.h b/src/configmanager.h new file mode 100644 index 0000000..d5ecd7d --- /dev/null +++ b/src/configmanager.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #ifndef CONFIG_MANAGER_H | ||
| 2 | #define CONFIG_MANAGER_H | ||
| 3 | |||
| 4 | #include "config.h" | ||
| 5 | #include "singleton.h" | ||
| 6 | #include <string> | ||
| 7 | |||
| 8 | class ConfigManager : public Singleton<ConfigManager> | ||
| 9 | { | ||
| 10 | friend class Singleton<ConfigManager>; | ||
| 11 | protected: | ||
| 12 | ConfigManager(); | ||
| 13 | ~ConfigManager(); | ||
| 14 | |||
| 15 | public: | ||
| 16 | void loadConfig( const char *lpProfile="default" ); | ||
| 17 | |||
| 18 | private: | ||
| 19 | bool parseConfig( const char *lpFileName, const char *lpProfile ); | ||
| 20 | bool processProfile( class XmlNode *pBase ); | ||
| 21 | |||
| 22 | public: // Getters, these should be moved if we make this a base class... | ||
| 23 | std::string &getDefLanguage(); | ||
| 24 | std::string &getBackend(); | ||
| 25 | |||
| 26 | private: // Properties, these should be moved if we make this a base class... | ||
| 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 | }; | ||
| 31 | |||
| 32 | #endif | ||
