M_ThirdPluginCFG.h 677 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ThirdPluginCFGData
  5. {
  6. //渠道号
  7. std::string mChannelID;
  8. //平台
  9. std::string mPlatform;
  10. //脚本路径
  11. std::string mLuaFilePath;
  12. //备注
  13. std::string mRemark;
  14. };
  15. class M_ThirdPluginCFG
  16. {
  17. public:
  18. private:
  19. static std::auto_ptr<M_ThirdPluginCFG> msSingleton;
  20. public:
  21. int GetCount();
  22. const M_ThirdPluginCFGData* GetData(std::string ChannelID);
  23. boost::unordered_map<std::string, M_ThirdPluginCFGData>& GetMapData();
  24. void Reload();
  25. void Load(const std::string& path);
  26. void Load();
  27. static M_ThirdPluginCFG* GetSingleton();
  28. private:
  29. boost::unordered_map<std::string, M_ThirdPluginCFGData> mMapData;
  30. };