M_PopupCFG.h 699 B

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