M_PopupCFG.h 647 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <map>
  3. struct M_PopupCFGData
  4. {
  5. //界面Key
  6. std::string mKey;
  7. //场景进入(登录,游戏)
  8. std::string mScene;
  9. //奖励开关
  10. int mRewardCon;
  11. //额外描述
  12. std::string mOtherDes;
  13. //排序
  14. int mOder;
  15. //渠道
  16. std::vector<std::string> mChannel;
  17. };
  18. class M_PopupCFG
  19. {
  20. public:
  21. private:
  22. static std::auto_ptr<M_PopupCFG> msSingleton;
  23. public:
  24. int GetCount();
  25. const M_PopupCFGData* GetData(std::string Key);
  26. const std::map<std::string, M_PopupCFGData>& GetMapData();
  27. void Load();
  28. void LoadLua();
  29. void Reload();
  30. static M_PopupCFG* GetSingleton();
  31. static void Release();
  32. private:
  33. std::map<std::string, M_PopupCFGData> mMapData;
  34. };