Fish_TelephoneBillDropCFG.h 684 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_TelephoneBillDropCFGData
  5. {
  6. //编号
  7. int mId;
  8. //充值金额
  9. int mRechargeLimit;
  10. //历史话费和掉落概率
  11. std::vector<int> mHistoricalCharges;
  12. };
  13. class Fish_TelephoneBillDropCFG
  14. {
  15. public:
  16. private:
  17. static std::auto_ptr<Fish_TelephoneBillDropCFG> msSingleton;
  18. public:
  19. int GetCount();
  20. const Fish_TelephoneBillDropCFGData* GetData(int Id);
  21. boost::unordered_map<int, Fish_TelephoneBillDropCFGData>& GetMapData();
  22. void Reload();
  23. void Load(const std::string& path);
  24. void Load();
  25. static Fish_TelephoneBillDropCFG* GetSingleton();
  26. private:
  27. boost::unordered_map<int, Fish_TelephoneBillDropCFGData> mMapData;
  28. };