M_ChannelSetCFG.h 708 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ChannelSetCFGData
  5. {
  6. //渠道ID
  7. std::string mID;
  8. //描述信息
  9. std::string mDesc;
  10. //快速登陆
  11. bool mEnableFastLogin;
  12. //本地登录
  13. bool mEnableLocalLogin;
  14. //开放其他游戏需达到的等级
  15. int mFishLvToOpen;
  16. };
  17. class M_ChannelSetCFG
  18. {
  19. public:
  20. private:
  21. static std::auto_ptr<M_ChannelSetCFG> msSingleton;
  22. public:
  23. int GetCount();
  24. const M_ChannelSetCFGData* GetData(std::string ID);
  25. boost::unordered_map<std::string, M_ChannelSetCFGData>& GetMapData();
  26. void Reload();
  27. void Load(const std::string& path);
  28. void Load();
  29. static M_ChannelSetCFG* GetSingleton();
  30. private:
  31. boost::unordered_map<std::string, M_ChannelSetCFGData> mMapData;
  32. };