Odds2_Profit.h 599 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Odds2_ProfitData
  5. {
  6. //盈利(10000)
  7. int mProfit;
  8. //RAND区间的下限(10000)
  9. int mRandLower;
  10. //RAND区间的上限(10000)
  11. int mRandUpper;
  12. };
  13. class Odds2_Profit
  14. {
  15. public:
  16. private:
  17. static std::auto_ptr<Odds2_Profit> msSingleton;
  18. public:
  19. int GetCount();
  20. const Odds2_ProfitData* GetData(int Profit);
  21. boost::unordered_map<int, Odds2_ProfitData>& GetMapData();
  22. void Reload();
  23. void Load(const std::string& path);
  24. void Load();
  25. static Odds2_Profit* GetSingleton();
  26. private:
  27. boost::unordered_map<int, Odds2_ProfitData> mMapData;
  28. };