⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 membuf.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name:        membuf.tex%% Purpose:     wxMemoryBuffer class documentation%% Author:      Roger Gammans%% Modified by:%% Created:     08.06.2004%% RCS-ID:      $Id: membuf.tex,v 1.3 2005/02/22 15:09:51 ABX Exp $%% Copyright:   (c) Roger Gammans%% License:     wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxMemoryBuffer}}\label{wxmemorybuffer}A {\bf wxMemoryBuffer} is a useful data structure for storing arbitrary sized blocksof memory. wxMemoryBuffer guarantees deletion of the memory block when the objectis destroyed. \wxheading{Derived from}None\wxheading{Include files}<wx/buffer.h>\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxMemoryBuffer::wxMemoryBuffer}\label{wxmemorybufferctor}\func{}{wxMemoryBuffer}{\param{const wxMemoryBuffer\&}{ src}}Copy constructor, refcounting is used for performance , but wxMemoryBufferis not a copy-on-write structure so changes made to one buffer effectall copies made from it.\func{}{wxMemoryBuffer}{\param{size\_t}{ size}}Create a new buffer.\docparam{size}{size of new buffer.}\membersection{wxMemoryBuffer::GetData}\label{wxmemorybuffergetdata}\func{void* }{GetData}{\void}Return a pointer to the data in the buffer.\membersection{wxMemoryBuffer::GetBufSize}\label{wxmemorybuffergetbufsize}\func{size\_t}{GetBufSize}{\void}Returns the size of the buffer.\membersection{wxMemoryBuffer::GetDataLen}\label{wxmemorybuffergetdatalen}\func{size\_t}{GetDataLen}{\void}Returns the length of the valid data in the buffer.\membersection{wxMemoryBuffer::SetBufSize}\label{wxmemorybuffersetbufsize}\func{void}{SetBufSize}{\param{size\_t}{ size}}Ensures the buffer has at least {\it size} bytes available.\membersection{wxMemoryBuffer::SetDataLen}\label{wxmemorybuffersetdatalen}\func{void}{SetDataLen}{\param{size\_t}{ size}}Sets the length of the data stored in the buffer.  Mainly useful for truncating existing data.\docparam{size}{New length of the valid data in the buffer. This isdistinct from the allocated size}\membersection{wxMemoryBuffer::GetWriteBuf}\label{wxmemorybuffergetwritebuf}\func{void *}{GetWriteBuf}{\param{size\_t}{ sizeNeeded}}Ensure the buffer is big enough and return a pointer to thebuffer which can be used to directly write into the bufferup to {\it sizeNeeded} bytes.\membersection{wxMemoryBuffer::UngetWriteBuf}\label{wxmemorybufferungetwritebuf}\func{void}{UngetWriteBuf}{\param{size\_t}{ sizeUsed}}Update the buffer after completing a direct write, whichyou must have used GetWriteBuf() to initialise.\docparam{sizeUsed}{The amount of data written in to bufferby the direct write}\membersection{wxMemoryBuffer::GetAppendBuf}\label{wxmemorybuffergetappendbuf}\func{void *}{GetAppendBuf}{\param{size\_t}{ sizeNeeded}}Ensure that the buffer is big enough and return a pointer to the startof the empty space in the buffer. This pointer can be used to directly write data into the buffer, this new data will be appended tothe existing data.\docparam{sizeNeeded}{Amount of extra space required in the buffer forthe append operation}\membersection{wxMemoryBuffer::UngetAppendBuf}\label{wxmemorybufferungetappendbuf}\func{void}{UngetAppendBuf}{\param{size\_t}{ sizeUsed}}Update the length after completing a direct append, whichyou must have used GetAppendBuf() to initialise.\docparam{sizeUsed}{This is the amount of new data that has been appended.}\membersection{wxMemoryBuffer::AppendByte}\label{wxmemorybufferappendbyte}\func{void}{AppendByte}{\param{char}{ data}}Append a single byte to the buffer.\docparam{data}{New byte to append to the buffer.}\membersection{wxMemoryBuffer::AppendData}\label{wxmemorybufferappenddata}\func{void}{AppendData}{\param{void*}{ data}, \param{size\_t}{ len}}Single call to append a data block to the buffer.\docparam{data}{Pointer to block to append to the buffer.}\docparam{len}{Length of data to append.}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -