123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include <map>
- struct M_RobotsCFGData
- {
- //编号
- int mID;
- //排行类型
- int mRankingTyep;
- //上榜时间
- std::vector<int> mTime;
- //机器人数量
- std::vector<int> mNumberOfRobots;
- //最小积分
- int mMin;
- //最大积分
- int mMax;
- //最小生成历史条数
- int mCreateHisCountMin;
- //最大生成历史条数
- int mCreateHisCountMax;
- };
- class M_RobotsCFG
- {
- public:
- private:
- static std::auto_ptr<M_RobotsCFG> msSingleton;
- public:
- int GetCount();
- const M_RobotsCFGData* GetData(int ID);
- const std::map<int, M_RobotsCFGData>& GetMapData();
- void Load();
- void LoadLua();
- void Reload();
- static M_RobotsCFG* GetSingleton();
- static void Release();
- private:
- std::map<int, M_RobotsCFGData> mMapData;
- };
|