.\" This is a wxWidgets manpage page generated from the XML docs .TH wxMemoryBuffer 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxMemoryBuffer \- .SH DESCRIPTION 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. .SH "PARENTS" .SH "INCLUDE FILES" wx/buffer.h .SH MEMBERS .SS wxMemoryBuffer (const wxMemoryBuffer& src) 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. .SS wxMemoryBuffer (size_t size) Create a new buffer. .SS void* GetData () Return a pointer to the data in the buffer. .SS size_t GetBufSize () Returns the size of the buffer. .SS size_t GetDataLen () Returns the length of the valid data in the buffer. .SS void SetBufSize (size_t size) Ensures the buffer has at least size bytes available. .SS void SetDataLen (size_t size) Sets the length of the data stored in the buffer. Mainly useful for truncating existing data. .SS void * GetWriteBuf (size_t sizeNeeded) 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. .SS void UngetWriteBuf (size_t sizeUsed) Update the buffer after completing a direct write, which you must have used GetWriteBuf() to initialise. .SS void * GetAppendBuf (size_t sizeNeeded) 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. .SS void UngetAppendBuf (size_t sizeUsed) Update the length after completing a direct append, which you must have used GetAppendBuf() to initialise. .SS void AppendByte (char data) Append a single byte to the buffer. .SS void AppendData (void* datasize_t len) Single call to append a data block to the buffer. .SH "SEE ALSO" .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.