MyGUI
3.2.1
|
00001 /* 00002 * This source file is part of MyGUI. For the latest info, see http://mygui.info/ 00003 * Distributed under the MIT License 00004 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) 00005 */ 00006 00007 #ifndef __MYGUI_DATA_STREAM_HOLDER_H__ 00008 #define __MYGUI_DATA_STREAM_HOLDER_H__ 00009 00010 #include "MyGUI_Prerequest.h" 00011 #include "MyGUI_DataManager.h" 00012 00013 namespace MyGUI 00014 { 00015 00016 class DataStreamHolder 00017 { 00018 public: 00019 DataStreamHolder(IDataStream* _data) : 00020 mData(_data) 00021 { 00022 } 00023 00024 ~DataStreamHolder() 00025 { 00026 DataManager::getInstance().freeData(mData); 00027 } 00028 00029 IDataStream* getData() 00030 { 00031 return mData; 00032 } 00033 00034 private: 00035 IDataStream* mData; 00036 }; 00037 00038 } // namespace MyGUI 00039 00040 #endif // __MYGUI_DATA_STREAM_HOLDER_H__