Subclass of the instream base class used for reading data from a disk file.
More...
#include <instream_file.h>
|
|
static void | unittest (void) |
| | Unit test this class.
|
| |
|
|
file | disk_file |
| | The file to read from.
|
| |
|
size_t | file_length |
| | The length of the file.
|
| |
|
size_t | bytes_read |
| | The number of bytes that have been read from the file.
|
| |
|
std::shared_ptr< instream > | source |
| | If this object is reading from another instream then this is that instream.
|
| |
|
std::shared_ptr< allocator > | memory |
| | Any and all memory allocation must happen using this object.
|
| |
Subclass of the instream base class used for reading data from a disk file.
- Examples:
- parser_use.cpp.
◆ instream_file() [1/2]
| JASS::instream_file::instream_file |
( |
FILE * |
file | ) |
|
|
protected |
◆ instream_file() [2/2]
| JASS::instream_file::instream_file |
( |
const std::string & |
filename | ) |
|
Constructor.
- Parameters
-
| filename | [in] The name of the file to use as the input stream |
◆ read()
| void JASS::instream_file::read |
( |
document & |
buffer | ) |
|
|
virtual |
Read buffer.contents.size() bytes of data into buffer.contents, resizing on eof.
- Parameters
-
| buffer | [out] buffer.contents.size() bytes of data are read from source into buffer which is resized to the number of bytes read on eof. |
Implements JASS::instream.
The documentation for this class was generated from the following files: