ReadBufferSavePoint
ReadBufferSavePoint

Acts as a save point so that bytes can be read out of a DataBuffer and the read point reverted

See Also

DataBuffer

Functions
ReadBufferSavePoint
ReadBufferSavePoint(
DataBuffer *data
)

Creates a ReadBufferSavePoint based on the DataBuffer passed in

Parameters
data

the data that will be updated or reverted

ReadBufferSavePoint
~ReadBufferSavePoint()

Destroying a ReadBufferSavePoint object, reverting any uncommited data

Variables
m_data
DataBuffer* m_data

The DataBuffer of data to be accessed

m_savePosition
std::size_t m_savePosition

The current save position in the DataBuffer

Functions
revert
void revert()

reverts the read position of the DataBuffer back to its saved position

commit
void commit()

commits all the currently read data so that it will not be reverted