#pragma once #include #include struct M_NoticeData { //key int mID; //图片 std::string mIcon; //标题 std::string mName; //内容 std::string mContent; //显示排序 int mIndex; //开始时间 std::string mStartTime; //结束时间 std::string mEndTime; }; class M_Notice { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const M_NoticeData* GetData(int ID); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static M_Notice* GetSingleton(); private: boost::unordered_map mMapData; };