Go to the documentation of this file.00001
00002
00003 #ifndef _CONFIGFILE_H_
00004 #define _CONFIGFILE_H_
00005
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008
00009 #include <string>
00010 #include <list>
00011 #include <map>
00012
00013 namespace core
00014 {
00015
00022 class ENGINE_PUBLIC_EXPORT ConfigFile
00023 {
00024 public:
00025
00026 ConfigFile();
00027 ~ConfigFile();
00028
00029 bool load(const std::string& filename, const std::string& separators = "\t:=");
00030 bool save(const std::string& filename, const c8 separator = '\t');
00031
00033 std::string getSetting(const std::string& key);
00035 std::list<std::string> getMultiSetting(const std::string& key);
00036 std::multimap<std::string, std::string>::const_iterator getSettingsBegin();
00037 std::multimap<std::string, std::string>::const_iterator getSettingsEnd();
00038 void setSetting(const std::string& key, const std::string& value);
00039
00040 protected:
00041
00042 std::multimap<std::string, std::string> mSettings;
00043 };
00044
00045 }
00046
00047 #endif