MyGUI  3.2.1
MyGUI_DataFileStream.cpp
Go to the documentation of this file.
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 #include "MyGUI_Precompiled.h"
00008 #include "MyGUI_DataFileStream.h"
00009 
00010 namespace MyGUI
00011 {
00012 
00013     DataFileStream::DataFileStream() :
00014         DataStream(),
00015         mFileStream(nullptr)
00016     {
00017     }
00018 
00019     DataFileStream::DataFileStream(std::ifstream* _stream) :
00020         DataStream(_stream),
00021         mFileStream(_stream)
00022     {
00023     }
00024 
00025     DataFileStream::~DataFileStream()
00026     {
00027         if (mFileStream != nullptr)
00028         {
00029             mFileStream->close();
00030             delete mFileStream;
00031             mFileStream = nullptr;
00032         }
00033     }
00034 
00035 } // namespace MyGUI