A wxMemoryBuffer is a useful data structure for storing arbitrary sized blocks of memory. wxMemoryBuffer guarantees deletion of the memory block when the object is destroyed.
Derived from
None
Include files
<wx/buffer.h>
Copy constructor, refcounting is used for performance , but wxMemoryBuffer is not a copy-on-write structure so changes made to one buffer effect all copies made from it.
Create a new buffer.
Return a pointer to the data in the buffer.
Returns the size of the buffer.
Returns the length of the valid data in the buffer.
Ensures the buffer has at least size bytes available.
Sets the length of the data stored in the buffer. Mainly useful for truncating existing data.
Ensure the buffer is big enough and return a pointer to the buffer which can be used to directly write into the buffer up to sizeNeeded bytes.
Update the buffer after completing a direct write, which you must have used GetWriteBuf() to initialise.
Ensure that the buffer is big enough and return a pointer to the start of the empty space in the buffer. This pointer can be used to directly write data into the buffer, this new data will be appended to the existing data.
Update the length after completing a direct append, which you must have used GetAppendBuf() to initialise.
Append a single byte to the buffer.
Single call to append a data block to the buffer.