Fish_RobotCFG.h 509 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <map>
  3. struct Fish_RobotCFGData
  4. {
  5. //key
  6. std::string mKey;
  7. //ÊýÖµ
  8. int mValue;
  9. };
  10. class Fish_RobotCFG
  11. {
  12. public:
  13. private:
  14. static std::auto_ptr<Fish_RobotCFG> msSingleton;
  15. public:
  16. int GetCount();
  17. const Fish_RobotCFGData* GetData(std::string Key);
  18. const std::map<std::string, Fish_RobotCFGData>& GetMapData();
  19. void Load();
  20. void LoadLua();
  21. void Reload();
  22. static Fish_RobotCFG* GetSingleton();
  23. static void Release();
  24. private:
  25. std::map<std::string, Fish_RobotCFGData> mMapData;
  26. };