Buffer where the data can be added to both the beginning and the end of the buffer.
More...
|
| MBufferBidirectional () |
| Construct an empty bidirectional buffer. More...
|
|
| ~MBufferBidirectional () |
| Attention, the destructor is not virtual!
|
|
const char * | GetTotalPtr () const |
| Raw pointer to the whole buffer data. More...
|
|
unsigned | GetTotalSize () const |
| Size of the whole buffer data. More...
|
|
unsigned | GetHeaderSize () const |
| Size of the header part of the buffer. More...
|
|
char * | GetBodyPtr () |
| Raw pointer to the whole body part of the data. More...
|
|
const char * | GetBodyPtr () const |
| Raw constant pointer to the whole body part of the data. More...
|
|
unsigned | GetBodySize () const |
| Size of the body part of the buffer. More...
|
|
void | ClearWithReserve (unsigned headerSize, unsigned totalCapacity) |
| Clear the data, but keep reserved the byte space. More...
|
|
void | Assign (const MByteString &data) |
| Assign the given data to the body, and clear the header. More...
|
|
void | Assign (const char *buff, unsigned size) |
| Assign the given pointer and size to the body, and clear the header. More...
|
|
void | Prepend (char c) |
| Prepend a character at the header of the bidirectional buffer. More...
|
|
void | Prepend (const MByteString &data) |
| Prepend bytes at the header of the bidirectional buffer. More...
|
|
void | Prepend (const char *buff, unsigned size) |
| Prepend bytes at the header of the bidirectional buffer. More...
|
|
void | PrependIsoLength (unsigned len) |
| Prepend ISO 8825 length to the header of the bidirectional buffer. More...
|
|
void | PrependUidIfPresent (char tag, const MByteString &uid) |
| Prepend ISO 8825 UID to the header of this buffer, if the uid is given. More...
|
|
void | PrependUnsigned (char tag, unsigned val) |
| Prepend ISO 8825 unsigned value to the header of this buffer. More...
|
|
| MBuffer () |
| Constructor of an empty unallocated buffer. More...
|
|
| ~MBuffer () |
| Attention, the destructor is not virtual.
|
|
MByteString & | AccessAllBytes () |
| Access all bytes in the buffer.
|
|
const MByteString & | AccessAllBytes () const |
| Constant access all bytes in the buffer.
|
|
void | Resize (unsigned size) |
| Resize buffer. More...
|
|
void | Reserve (unsigned capacity) |
| Reserve the given number of bytes in the whole buffer. More...
|
|
void | Clear () |
| Make buffer size equal to zero.
|
|
void | Assign (unsigned size, char c) |
| Assign the whole buffer with the given character of the given length. More...
|
|
void | Assign (const MByteString &data) |
| Assign the whole buffer with the given data. More...
|
|
void | Assign (const char *buff, unsigned size) |
| Assign the whole buffer with the given data. More...
|
|
void | Append (char c) |
| Append a character or byte to the buffer. More...
|
|
void | Append (const MByteString &data) |
| Append a chunk to the existing buffer. More...
|
|
void | Append (const char *buff, unsigned size) |
| Append a chunk determined by the pointer and size to the existing buffer. More...
|
|
void | AppendIsoLength (unsigned len) |
| Append ISO 8825 length BER representation to this buffer. More...
|
|
void | AppendUidIfPresent (char tag, const MByteString &uid) |
| Append ISO 8825 UID to this buffer, if the uid is given. More...
|
|
void | AppendUnsigned (char tag, unsigned val) |
| Append ISO 8825 unsigned value to this buffer. More...
|
|
char * | GetTotalPtr () |
| Raw pointer to the whole buffer data. More...
|
|
const char * | GetTotalPtr () const |
| Constant raw pointer to the whole buffer data. More...
|
|
unsigned | GetTotalSize () const |
| Size of the whole buffer. More...
|
|
Buffer where the data can be added to both the beginning and the end of the buffer.
The left part of the bidirectional buffer is the header, it is prepended. The right part of the bidirectional buffer is the body, it is appended.
The internal implementation of this class is subject to change.