sipxmedialib
Version 3.3
|
Stores data right after the header. More...
#include <MpArrayBuf.h>
Public Member Functions | |
Manipulators | |
bool | setDataSize (int size) |
Set current data size. More... | |
Public Member Functions inherited from MpBuf | |
void | attach () |
Increments reference counter. More... | |
void | detach () |
Decrements reference counter and free buffer if needed. More... | |
void | setFlowGraph (MpFlowGraphBase *flowgraph) |
MP_BUFFERS_TREE | getType () const |
Get buffer type. More... | |
MpBufPool * | getBufferPool () const |
Get parent pool of this buffer. More... | |
Protected Member Functions | |
void | init () |
This is called in place of constructor. More... | |
Protected Attributes | |
unsigned | mDataSize |
Size of the following data (in bytes). More... | |
char | mpData [1] |
Pointer to the data, following this header. More... | |
Protected Attributes inherited from MpBuf | |
MP_BUFFERS_TREE | mType |
Buffer class type. Used for type safety. More... | |
int | mRefCounter |
Reference counter for use with MpBufPtr. More... | |
MpBufPool * | mpPool |
Parent memory pool. More... | |
MpFlowGraphBase * | mpFlowGraph |
Debug pointer to flowgraph in which this buf is used. More... | |
void(* | mpDestroy )(MpBuf *) |
void(* | mpInitClone )(MpBuf *) |
Private Member Functions | |
MpArrayBuf (const MpBuf &) | |
Disable copy (and other) constructor. More... | |
MpArrayBuf & | operator= (const MpBuf &) |
Disable assignment operator. More... | |
Friends | |
class | MpArrayBufPtr |
Accessors | |
char * | getDataWritePtr () |
Get pointer to the buffer data with intent to write/change it. More... | |
const char * | getDataPtr () const |
Get read only pointer to the buffer data. More... | |
unsigned | getMaxDataSize () const |
Get maximum allowed payload size (in bytes). More... | |
unsigned | getDataSize () const |
Get current data size. More... | |
static int | getHeaderSize () |
Get size of MpArrayBuf without data (in bytes). More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from MpBuf | |
static void | sInitClone (MpBuf *pBuffer) |
Function that initialize buffer after cloning. It adjusts reference counters. More... | |
Stores data right after the header.
This class adds two features to MpBuf - pointer to data, located right after the MpArrayBuf object, and its size. Size of the data may be set by user to any acceptable value. See setDataSize() for more details about data size setting.
|
private |
Disable copy (and other) constructor.
This struct will be initialized by init() member.
bool setDataSize | ( | int | size | ) |
Set current data size.
New data size could not be greater then allocated space (provided by getMaxDataSize()).
size | new data size |
|
inline |
Get pointer to the buffer data with intent to write/change it.
|
inline |
Get read only pointer to the buffer data.
|
inlinestatic |
Get size of MpArrayBuf without data (in bytes).
|
inline |
Get maximum allowed payload size (in bytes).
|
inline |
Get current data size.
|
protected |
This is called in place of constructor.
|
private |
Disable assignment operator.
Buffers may be copied. But do we need this?
|
friend |
|
protected |
Size of the following data (in bytes).
|
protected |
Pointer to the data, following this header.