12345678910111213141516171819202122232425262728293031 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_GeneratorCFGData
- {
- //key
- int mID;
- //ÓãÕóÃû×Ö
- std::string mName;
- //ÓãÕóÀàÐÍ
- int mType;
- //²ÎÊý
- std::vector<int> mParam;
- };
- class Fish_GeneratorCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_GeneratorCFG> msSingleton;
- public:
- int GetCount();
- const Fish_GeneratorCFGData* GetData(int ID);
- boost::unordered_map<int, Fish_GeneratorCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_GeneratorCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_GeneratorCFGData> mMapData;
- };
|