Memory backed input stream. More...
Public Member Functions | |
InputBuffer () | |
Default constructor. More... | |
InputBuffer (const blob &blob) | |
Construct from a blob. More... | |
InputBuffer (const void *buffer, uint32_t length) | |
Construct form a raw memory pointer. More... | |
bool | IsEof () const |
Check if the stream is at the end of the underlying memory buffer. More... | |
Memory backed input stream.
bond::InputBuffer::InputBuffer | ( | ) |
Default constructor.
bond::InputBuffer::InputBuffer | ( | const blob & | blob | ) |
Construct from a blob.
InputBuffer makes a copy of the blob. Assuming that the blob was created using a ref-counted smart pointer this assures proper lifetime management for the underlying memory buffer.
bond::InputBuffer::InputBuffer | ( | const void * | buffer, |
uint32_t | length | ||
) |
Construct form a raw memory pointer.
Pointer(s) to the memory buffer may be held by the objects deserialized from the stream. It is the application's responsibility to manage the lifetime of the memory buffer appropriately.
bool bond::InputBuffer::IsEof | ( | ) | const |
Check if the stream is at the end of the underlying memory buffer.