M_VipDesc.h 583 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_VipDescData
  5. {
  6. //编号
  7. int mID;
  8. //vip等级
  9. int mVipLevel;
  10. //是否新内容(1:是 0:不是)
  11. int mNewContent;
  12. //描述
  13. std::string mDesc;
  14. };
  15. class M_VipDesc
  16. {
  17. public:
  18. private:
  19. static std::auto_ptr<M_VipDesc> msSingleton;
  20. public:
  21. int GetCount();
  22. const M_VipDescData* GetData(int ID);
  23. boost::unordered_map<int, M_VipDescData>& GetMapData();
  24. void Reload();
  25. void Load(const std::string& path);
  26. void Load();
  27. static M_VipDesc* GetSingleton();
  28. private:
  29. boost::unordered_map<int, M_VipDescData> mMapData;
  30. };