Public Member Functions | |
TZeroInitialiseExpandableBuffer (size_t initialSize=0) | |
Create a buffer of the specified initialSize. If the size is 0 then the buffer must be resized or expanded before use. | |
TZeroInitialiseExpandableBuffer (const TZeroInitialiseExpandableBuffer &rhs) | |
TZeroInitialiseExpandableBuffer & | operator= (const TZeroInitialiseExpandableBuffer &rhs) |
size_t | Resize (size_t newSize) |
Make the buffer bigger, but do not copy the previous contents to the new buffer. Return the new size. | |
size_t | Expand (size_t newSize) |
Make the buffer bigger and copy the previous contents to the new buffer. Return the new size. | |
template<> | |
void | ZeroFillBuffer (BYTE *pT, const size_t size) |
T * | GetBuffer () const |
Access the buffer. | |
operator T * () const | |
Access the buffer. | |
size_t | GetSize () const |
Obtain the size of the buffer. | |
T * | ReleaseBuffer () |
Remove the actual memory used to store the date from the buffer. The buffer is left with a buffer of size 0. The caller is responsible for destroying the memory returned, using delete [], once they've finished with it. | |
void | Swap (TExpandableBuffer &rhs) |
Swap the internal storage and state from this buffer with the supplied buffer. |
TZeroInitialiseExpandableBuffer | ( | size_t | initialSize = 0 |
) | [inline, explicit] |
Create a buffer of the specified initialSize. If the size is 0 then the buffer must be resized or expanded before use.
TZeroInitialiseExpandableBuffer | ( | const TZeroInitialiseExpandableBuffer< T > & | rhs | ) | [inline] |
TZeroInitialiseExpandableBuffer< T > & operator= | ( | const TZeroInitialiseExpandableBuffer< T > & | rhs | ) | [inline] |
size_t Resize | ( | size_t | newSize | ) | [inline] |
Make the buffer bigger, but do not copy the previous contents to the new buffer. Return the new size.
Reimplemented from TExpandableBuffer.
size_t Expand | ( | size_t | newSize | ) | [inline] |
Make the buffer bigger and copy the previous contents to the new buffer. Return the new size.
Reimplemented from TExpandableBuffer.
void ZeroFillBuffer | ( | BYTE * | pT, | |
const size_t | size | |||
) | [inline] |
T * GetBuffer | ( | ) | const [inline, inherited] |
Access the buffer.
operator T * | ( | ) | const [inline, inherited] |
Access the buffer.
size_t GetSize | ( | ) | const [inline, inherited] |
Obtain the size of the buffer.
T * ReleaseBuffer | ( | ) | [inline, inherited] |
Remove the actual memory used to store the date from the buffer. The buffer is left with a buffer of size 0. The caller is responsible for destroying the memory returned, using delete [], once they've finished with it.
void Swap | ( | TExpandableBuffer< T > & | rhs | ) | [inline, inherited] |
Swap the internal storage and state from this buffer with the supplied buffer.