#pragma once #include #include struct M_SoundCFGData { //声音ID int mSoundID; //声音名字 std::string mSoundName; //声音路径 std::string mSoundPath; //声音时间 int mSoundTime; //声音优先级 int mSoundPriority; }; class M_SoundCFG { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const M_SoundCFGData* GetData(int SoundID); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static M_SoundCFG* GetSingleton(); private: boost::unordered_map mMapData; };