MPSolve 3.2.1
|
The MemoryFileStream class provides an implementation of the abstract class AbstractInputStream
that will stream the data contained in the area stored in memory.
More...
#include <memory-file-stream.h>
Public Member Functions | |
MemoryFileStream (const char *source) | |
Allocate a new MemoryFileStream that wil provide that data stored by the given pointer. More... | |
size_t | readline (char **buffer, size_t *length) |
Implementation of the readline() method of the AbstractInputStream parent. More... | |
bool | eof () |
Implementation of the eof() method of AbstractInputStream . More... | |
int | getchar () |
Obtain a single character. More... | |
virtual size_t | readline (char **buffer, size_t *length)=0 |
Return a new line of the stream or NULL if we are at the end. More... | |
virtual bool | eof ()=0 |
Check if we are at the end of the stream. More... | |
virtual int | getchar ()=0 |
Obtain a single character. More... | |
The MemoryFileStream class provides an implementation of the abstract class AbstractInputStream
that will stream the data contained in the area stored in memory.
MemoryFileStream::MemoryFileStream | ( | const char * | source | ) |
Allocate a new MemoryFileStream that wil provide that data stored by the given pointer.
source | A pointer to the data that should be provided by this instance. |
|
virtual |
Implementation of the eof() method of AbstractInputStream
.
Implements mps::AbstractInputStream.
|
virtual |
Obtain a single character.
Implements mps::AbstractInputStream.
|
virtual |
Implementation of the readline() method of the AbstractInputStream
parent.
buffer | A pointer to the buffer where the line will be stored. |
length | A pointer where the length of the allocated buffer at the end will be saved. |
Implements mps::AbstractInputStream.