![]() |
MAK Data Logger API Documentation for HLA
|
A smart buffer has a shared pointer to the memory buffer and an offset and size of a 'smart' sub buffer. More...
Collaboration diagram for MAKLogger::DtSmartBuffer:Public Member Functions | |
| DtSmartBuffer (const DtMemoryBufferSP &parentBuffer) | |
| Creates a smart sub buffer, that is maps directly to a single DtSmartBuffer. More... | |
| DtSmartBuffer (const DtMemoryBufferSP &parentBuffer, size_t offset, size_t size) | |
| CTOR which uses shared parent buffer. More... | |
| ~DtSmartBuffer () | |
| DTOR More... | |
| DtMemoryBufferSP | buffer () const |
| Get the memory buffer the smart buffer uses. More... | |
| void | setBuffer (const DtMemoryBufferSP &buffer) |
| Set the memory buffer the smart buffer uses. More... | |
| void * | data () |
| Get the data in the smart buffer. More... | |
| const void * | data () const |
| Get the const data in the smart buffer. More... | |
| size_t | size () const |
| Get the size of the smart buffer. More... | |
| void | resize (size_t) |
| Set the size of the smart buffer. More... | |
| size_t | availableSize () const |
| Get the available size left in the memory buffer. More... | |
| size_t | currentOffset () const |
| Get the current offset from the base memory. More... | |
| void | increaseOffset (int offsetInBytes) |
| Increase the offset in the memory buffer. More... | |
| void | setOffset (int offsetInBytes) |
| Set the offset from the beginning of the memory buffer. More... | |
| void | resetOffset () |
| Reset the offset to the beginning of the memory buffer. More... | |
Private Attributes | |
| DtMemoryBufferSP | myBuffer |
| void * | mySubData |
| size_t | mySize |
A smart buffer has a shared pointer to the memory buffer and an offset and size of a 'smart' sub buffer.
|
explicit |
Creates a smart sub buffer, that is maps directly to a single DtSmartBuffer.
Initializes offset to beginning of buffer and size to size of entire buffer.
| DtInvalid | input if the buffer is null. |
| MAKLogger::DtSmartBuffer::DtSmartBuffer | ( | const DtMemoryBufferSP & | parentBuffer, |
| size_t | offset, | ||
| size_t | size | ||
| ) |
CTOR which uses shared parent buffer.
| DtInvalidInput | when the offset is too large. |
| MAKLogger::DtSmartBuffer::~DtSmartBuffer | ( | ) |
DTOR
| size_t MAKLogger::DtSmartBuffer::availableSize | ( | ) | const |
Get the available size left in the memory buffer.
This will be >= to size
| DtMemoryBufferSP MAKLogger::DtSmartBuffer::buffer | ( | ) | const |
Get the memory buffer the smart buffer uses.
| size_t MAKLogger::DtSmartBuffer::currentOffset | ( | ) | const |
Get the current offset from the base memory.
| void* MAKLogger::DtSmartBuffer::data | ( | ) |
Get the data in the smart buffer.
| const void* MAKLogger::DtSmartBuffer::data | ( | ) | const |
Get the const data in the smart buffer.
| void MAKLogger::DtSmartBuffer::increaseOffset | ( | int | offsetInBytes | ) |
Increase the offset in the memory buffer.
| DtInvalidInput | when the offset is too large. |
| void MAKLogger::DtSmartBuffer::resetOffset | ( | ) |
Reset the offset to the beginning of the memory buffer.
| void MAKLogger::DtSmartBuffer::resize | ( | size_t | ) |
Set the size of the smart buffer.
| DtInvalidInput | when the offset is larger than the memory buffer or less than zero. |
| void MAKLogger::DtSmartBuffer::setBuffer | ( | const DtMemoryBufferSP & | buffer | ) |
Set the memory buffer the smart buffer uses.
This call initializes offset to beginning of buffer and size to size of entire buffer.
| DtInvalid | input if the buffer is null. |
| void MAKLogger::DtSmartBuffer::setOffset | ( | int | offsetInBytes | ) |
Set the offset from the beginning of the memory buffer.
| DtInvalidInput | when the offset is too large. |
| size_t MAKLogger::DtSmartBuffer::size | ( | ) | const |
Get the size of the smart buffer.
|
private |
|
private |
|
private |