Odds2_Info.h 486 B

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