M_RechangeExCFG.h 664 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_RechangeExCFGData
  5. {
  6. //渠道ID
  7. int mID;
  8. //渠道对应的paycode(顺序索引对应M_RechangeCFG.xls表充值ID)
  9. std::vector<int> mPayCodes;
  10. //对应充值表里的ID
  11. std::vector<int> mRechargeIDs;
  12. };
  13. class M_RechangeExCFG
  14. {
  15. public:
  16. private:
  17. static std::auto_ptr<M_RechangeExCFG> msSingleton;
  18. public:
  19. int GetCount();
  20. const M_RechangeExCFGData* GetData(int ID);
  21. boost::unordered_map<int, M_RechangeExCFGData>& GetMapData();
  22. void Reload();
  23. void Load(const std::string& path);
  24. void Load();
  25. static M_RechangeExCFG* GetSingleton();
  26. private:
  27. boost::unordered_map<int, M_RechangeExCFGData> mMapData;
  28. };