diff options
author | maximius <none@none> | 2009-10-17 15:51:44 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-17 15:51:44 -0700 |
commit | e585187b248f48b3c6e9247b49fa07c6565d65e5 (patch) | |
tree | 637c5b7ddacf41040bef4ea4f75a97da64c6a9bc /src/shared/Config/Config.h | |
parent | 26b5e033ffde3d161382fc9addbfa99738379641 (diff) |
*Backed out changeset 3be01fb200a5
--HG--
branch : trunk
Diffstat (limited to 'src/shared/Config/Config.h')
-rw-r--r-- | src/shared/Config/Config.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/Config/Config.h b/src/shared/Config/Config.h index 582c5266a8c..7070e6180c0 100644 --- a/src/shared/Config/Config.h +++ b/src/shared/Config/Config.h @@ -17,28 +17,37 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #ifndef CONFIG_H #define CONFIG_H + #include <Policies/Singleton.h> #include "Platform/Define.h" + class DOTCONFDocument; + class TRINITY_DLL_SPEC Config { public: Config(); ~Config(); + bool SetSource(const char *file, bool ignorecase = true); bool Reload(); + std::string GetStringDefault(const char * name, std::string def); bool GetBoolDefault(const char * name, const bool def); int32 GetIntDefault(const char * name, const int32 def); float GetFloatDefault(const char * name, const float def); + std::string GetFilename() const { return mFilename; } private: std::string mFilename; bool mIgnoreCase; DOTCONFDocument *mConf; }; + #define sConfig Trinity::Singleton<Config>::Instance() + #endif |