1234567891011121314151617181920212223242526272829 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_BaseInfoCFGData
- {
- //Key
- std::string mKey;
- //ÊýÖµ
- int mValue;
- //×Ö·û´®
- std::string mStringValue;
- };
- class M_BaseInfoCFG
- {
- public:
- private:
- static std::auto_ptr<M_BaseInfoCFG> msSingleton;
- public:
- int GetCount();
- const M_BaseInfoCFGData* GetData(std::string Key);
- boost::unordered_map<std::string, M_BaseInfoCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_BaseInfoCFG* GetSingleton();
- private:
- boost::unordered_map<std::string, M_BaseInfoCFGData> mMapData;
- };
|