FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
A RawDataSource for a file on the host system. More...
#include <rawdatafile.h>
Public Member Functions | |
RawDataFile (const std::string &file) | |
Constructor Constructs a RawDataSource for file. More... | |
virtual | ~RawDataFile () |
virtual uint32_t | getSize () const |
get the complete datasize More... | |
virtual void | readInto (uint8_t *buffer, uint32_t start, uint32_t length) |
read data from the source More... | |
![]() | |
RawDataSource () | |
virtual | ~RawDataSource () |
Private Attributes | |
std::string | m_file |
std::ifstream | m_stream |
uint32_t | m_filesize |
A RawDataSource for a file on the host system.
Definition at line 43 of file rawdatafile.h.
FIFE::RawDataFile::RawDataFile | ( | const std::string & | file | ) |
Constructor Constructs a RawDataSource for file.
file | The path to the file to load. |
CannotOpenFile |
Definition at line 36 of file rawdatafile.cpp.
References m_file, m_filesize, and m_stream.
|
virtual |
Definition at line 46 of file rawdatafile.cpp.
|
virtual |
get the complete datasize
Implements FIFE::RawDataSource.
Definition at line 50 of file rawdatafile.cpp.
References m_filesize.
|
virtual |
read data from the source
buffer | the data will be written into buffer |
start | the startindex inside the source |
length | length bytes will be written into buffer |
Implements FIFE::RawDataSource.
Definition at line 54 of file rawdatafile.cpp.
References m_stream.
|
private |
Definition at line 58 of file rawdatafile.h.
Referenced by RawDataFile().
|
private |
Definition at line 61 of file rawdatafile.h.
Referenced by getSize(), and RawDataFile().
|
private |
Definition at line 59 of file rawdatafile.h.
Referenced by RawDataFile(), and readInto().