#pragma once #include #include struct M_CDKEY_GiftCFGData { //礼包ID int mGiftId; //礼包名称 std::string mGiftName; //金币 int mGold; //钻石 int mGem; //龙珠 int mDragbonBall; //道具 std::vector mItem; }; class M_CDKEY_GiftCFG { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const M_CDKEY_GiftCFGData* GetData(int GiftId); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static M_CDKEY_GiftCFG* GetSingleton(); private: boost::unordered_map mMapData; };