#pragma once #include #include struct M_itemData { //ID int mID; //物品名称 std::string mname; //描述 std::string mdesc; //类型 int mtype; //品质 int mquality; //图标 std::string micon; }; class M_item { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const M_itemData* GetData(int ID); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static M_item* GetSingleton(); private: boost::unordered_map mMapData; };