M_RecordCFG.h 604 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_RecordCFGData
  5. {
  6. //统计ID
  7. int mRecordID;
  8. //记录名称
  9. std::string mRecordName;
  10. //记录信息列表
  11. std::vector<std::string> mRecordInfoList;
  12. };
  13. class M_RecordCFG
  14. {
  15. public:
  16. private:
  17. static std::auto_ptr<M_RecordCFG> msSingleton;
  18. public:
  19. int GetCount();
  20. const M_RecordCFGData* GetData(int RecordID);
  21. boost::unordered_map<int, M_RecordCFGData>& GetMapData();
  22. void Reload();
  23. void Load(const std::string& path);
  24. void Load();
  25. static M_RecordCFG* GetSingleton();
  26. private:
  27. boost::unordered_map<int, M_RecordCFGData> mMapData;
  28. };