#pragma once
#include <boost/unordered_map.hpp>
#include <vector>
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<M_Notice> msSingleton;
public:
	int GetCount();
	const M_NoticeData* GetData(int ID);
	boost::unordered_map<int, M_NoticeData>& GetMapData();
	void Reload();
	void Load(const std::string& path);
	void Load();
	static M_Notice* GetSingleton();
private:
	boost::unordered_map<int, M_NoticeData> mMapData;
};
