#pragma once #include #include struct Fish_RedPackagelotteryCFGData { //编号 int mId; //红包道具 int mRedPageItem; //红包数量(除以10) int mRedPageQuantity; //权重 int mWeight; }; class Fish_RedPackagelotteryCFG { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const Fish_RedPackagelotteryCFGData* GetData(int Id); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static Fish_RedPackagelotteryCFG* GetSingleton(); private: boost::unordered_map mMapData; };