Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <text_file.h>
Public Member Functions | |
TextFile (const String &file_path) | |
~TextFile () | |
const String & | GetFilePath () const |
const String & | GetFileContent () const |
Private Attributes | |
String | file_path_ |
String | file_content_ |
Wraps the loading and accessing of text files from disk.
TextFile allows you to load a text file from disk based on a given file path. It's content can be requested through TextFile::GetFileContent() which returns a String containing the full contents of the file. Under the hood, we use STL fstream to actually load the file.
blowbox::TextFile::TextFile | ( | const String & | file_path | ) |
Constructs a TextFile by loading a file from disk based on the supplied file_path argument.
[in] | file_path | The path to the file that you wish to load. |
blowbox::TextFile::~TextFile | ( | ) |
Destructs the TextFile.
const String & blowbox::TextFile::GetFileContent | ( | ) | const |
const String & blowbox::TextFile::GetFilePath | ( | ) | const |
|
private |
Contents of the file that is encapsulated by the TextFile.
|
private |
File path to the file that is encapsulated by the TextFile.