Subclass of instream for reading data from a memory buffer.
More...
#include <instream_memory.h>
|
|
static void | unittest (void) |
| | Unit test this class.
|
| |
|
|
size_t | bytes_read |
| | The number of bytes this object has read for the buffer.
|
| |
|
const uint8_t * | file |
| | A pointer to the in-memory buffer (thought of as an in-place file)
|
| |
|
size_t | file_length |
| | The length of the in-memory buffer.
|
| |
|
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 instream for reading data from a memory buffer.
◆ instream_memory()
| JASS::instream_memory::instream_memory |
( |
const void * |
memory, |
|
|
size_t |
length |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| memory | [in] A pointer to the start of the buffer |
| length | [in] The length of the buffer |
◆ read()
| void JASS::instream_memory::read |
( |
document & |
buffer | ) |
|
|
virtual |
Read buffer.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: