summaryrefslogtreecommitdiff
path: root/src/configmanager.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/configmanager.h32
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
8class ConfigManager : public Singleton<ConfigManager>
9{
10 friend class Singleton<ConfigManager>;
11protected:
12 ConfigManager();
13 ~ConfigManager();
14
15public:
16 void loadConfig( const char *lpProfile="default" );
17
18private:
19 bool parseConfig( const char *lpFileName, const char *lpProfile );
20 bool processProfile( class XmlNode *pBase );
21
22public: // Getters, these should be moved if we make this a base class...
23 std::string &getDefLanguage();
24 std::string &getBackend();
25
26private: // 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