MyGUI: MyGUI_DataFileStream.cpp Source File

MyGUI 3.2.2

MyGUI_DataFileStream.cpp
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #include "MyGUI_Precompiled.h"
8 #include "MyGUI_DataFileStream.h"
9
10 namespace MyGUI
11 {
12
13 DataFileStream::DataFileStream() :
14 DataStream(),
15 mFileStream(nullptr)
16 {
17 }
18
19 DataFileStream::DataFileStream(std::ifstream* _stream) :
20 DataStream(_stream),
21 mFileStream(_stream)
22 {
23 }
24
25 DataFileStream::~DataFileStream()
26 {
27 if (mFileStream != nullptr)
28 {
29 mFileStream->close();
30 delete mFileStream;
31 mFileStream = nullptr;
32 }
33 }
34
35 } // namespace MyGUI
MyGUI::DataStream
Definition: MyGUI_DataStream.h:16
MyGUI_Precompiled.h
MyGUI::DataFileStream::~DataFileStream
virtual ~DataFileStream()
Definition: MyGUI_DataFileStream.cpp:25
MyGUI_DataFileStream.h
MyGUI::DataFileStream::DataFileStream
DataFileStream()
Definition: MyGUI_DataFileStream.cpp:13
nullptr
#define nullptr
Definition: MyGUI_Prerequest.h:29
MyGUI
Definition: MyGUI_ActionController.h:14