M_Notice.h 604 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <map>
  3. struct M_NoticeData
  4. {
  5. //key
  6. int mID;
  7. //图片
  8. std::string mIcon;
  9. //标题
  10. std::string mName;
  11. //内容
  12. std::string mContent;
  13. //显示排序
  14. int mIndex;
  15. //开始时间
  16. std::string mStartTime;
  17. //结束时间
  18. std::string mEndTime;
  19. };
  20. class M_Notice
  21. {
  22. public:
  23. private:
  24. static std::auto_ptr<M_Notice> msSingleton;
  25. public:
  26. int GetCount();
  27. const M_NoticeData* GetData(int ID);
  28. const std::map<int, M_NoticeData>& GetMapData();
  29. void Load();
  30. void LoadLua();
  31. void Reload();
  32. static M_Notice* GetSingleton();
  33. static void Release();
  34. private:
  35. std::map<int, M_NoticeData> mMapData;
  36. };