11 #ifndef _INCLUDED_MPARRAYBUF_H // [ 12 #define _INCLUDED_MPARRAYBUF_H 77 return (
unsigned long)(&foo->
mpData[0] - (
char*)foo);
183 #endif // _INCLUDED_MPARRAYBUF_H ] #define MPBUF_TYPECHECKED_COPY(classname, buffer_type, base_classname)
Copy object from base type with type check.
Definition: MpBuf.h:407
char mpData[1]
Pointer to the data, following this header.
Definition: MpArrayBuf.h:101
static int getHeaderSize()
Get size of MpArrayBuf without data (in bytes).
Definition: MpArrayBuf.h:75
Begin of the MpArrayBuf type.
Definition: MpBuf.h:47
unsigned getBlockSize() const
Return size of the one block in the pool (in bytes).
Definition: MpBufPool.h:69
unsigned mDataSize
Size of the following data (in bytes).
Definition: MpArrayBuf.h:100
char * getDataWritePtr()
Get pointer to the buffer data with intent to write/change it.
Definition: MpArrayBuf.h:69
MpArrayBuf(const MpBuf &)
Disable copy (and other) constructor.
#define MPBUF_MEMBER_ACCESS_OPERATOR(classname)
Return pointer to buffer.
Definition: MpBuf.h:417
#define MPBUF_CONST_MEMBER_ACCESS_OPERATOR(classname)
Return readonly pointer to buffer.
Definition: MpBuf.h:422
void init()
This is called in place of constructor.
Definition: MpArrayBuf.cpp:51
unsigned getDataSize() const
Get current data size.
Definition: MpArrayBuf.h:86
Smart pointer to MpArrayBuf.
Definition: MpArrayBuf.h:128
const char * getDataPtr() const
Get read only pointer to the buffer data.
Definition: MpArrayBuf.h:72
MpArrayBuf & operator=(const MpBuf &)
Disable assignment operator.
MpBufPool * mpPool
Parent memory pool.
Definition: MpBuf.h:127
Smart pointer to MpBuf.
Definition: MpBuf.h:160
bool setDataSize(int size)
Set current data size.
Definition: MpArrayBuf.cpp:24
Base class for all media buffers.
Definition: MpBuf.h:74
unsigned getMaxDataSize() const
Get maximum allowed payload size (in bytes).
Definition: MpArrayBuf.h:82
Stores data right after the header.
Definition: MpArrayBuf.h:33
#define MPBUF_DEFAULT_CONSTRUCTOR(classname)
Default constructor - construct invalid pointer.
Definition: MpBuf.h:387
#define MPBUF_FROM_BASE_CONSTRUCTOR(classname, buffer_type, base_classname)
This constructor owns MpBuf object.
Definition: MpBuf.h:397