Bond
 
Loading...
Searching...
No Matches
bond::InputBuffer Class Reference

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...
 

Detailed Description

Memory backed input stream.

Constructor & Destructor Documentation

◆ InputBuffer() [1/3]

bond::InputBuffer::InputBuffer ( )

Default constructor.

◆ InputBuffer() [2/3]

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.

◆ InputBuffer() [3/3]

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.

Member Function Documentation

◆ IsEof()

bool bond::InputBuffer::IsEof ( ) const

Check if the stream is at the end of the underlying memory buffer.