Odds2_Info.h 538 B

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