![]() |
SCENE C++ API
2.1.2
|
Abstract interface for reading binary data. More...
#include <lsbinaryreader.h>
Public Member Functions | |
virtual size_t | read (uint8_t *buffer, size_t bufferSize)=0 |
Reads the number of requested bytes to the supplied memory buffer until the end of the stream is reached. More... | |
virtual size_t | getSize () const =0 |
Returns the exact overall size in bytes. More... | |
Additional Inherited Members | |
![]() | |
void | ref () const |
Increments the internal reference counter. More... | |
void | unref () const |
Decrements the internal reference counter. More... | |
Abstract interface for reading binary data.
The exact overall size of the data stream must be known in advance. This is an interface intended for streaming and the implementations must track the internal position on the data stream. Subsequent calls to read() will consume the stream until the end was reached and will never return the same data. In some cases this interface will be implemented by the SCENE API to allow apps to read data provided by the API, for example when reading Generic Binary Objects. In other cases this interface needs to be implemented by an app to provide data for the API, for example when creating Generic Binary Objects.
|
pure virtual |
Reads the number of requested bytes to the supplied memory buffer until the end of the stream is reached.
buffer | Destination buffer, needs to be preallocated. |
bufferSize | Maximum number of bytes to write into the buffer. |
|
pure virtual |
Returns the exact overall size in bytes.
May be slow depending on the implementation!