#include <WorkItemPool.h>
Public Types | |
enum | BufferType { Adopt, Ref, Copy } |
Public Member Functions | |
ManagedBuffer (unsigned char *buffer=NULL, ManagedBuffer::BufferType bufferType=ManagedBuffer::Adopt, unsigned long size=0, unsigned long maxBufferSize=MAX_MESSAGE_LEN) | |
ManagedBuffer (const ManagedBuffer &source) | |
ManagedBuffer & | operator= (const ManagedBuffer &source) |
ManagedBuffer | getRef () |
~ManagedBuffer () | |
void | allocate (unsigned long size) |
unsigned long | size () const |
unsigned long | max_size () const |
unsigned char * | buffer () const |
ManagedBuffer::BufferType | type () const |
string | str () const |
string | str (const string::size_type size) const |
void | copyFrom (const string &source, const unsigned long maxBufferSize=MAX_MESSAGE_LEN) |
void | copyFrom (const unsigned char *source, unsigned long size, unsigned long maxBufferSize=MAX_MESSAGE_LEN) |
void | copyFrom (const ManagedBuffer &source) |
void | copyFrom (const ManagedBuffer *source) |
void | truncate (const unsigned long index) |
ManagedBuffer | operator+ (const unsigned long offset) const |
ManagedBuffer & | operator+= (const unsigned long offset) |
long | operator- (const ManagedBuffer &source) const |
Private Attributes | |
ManagedBuffer::BufferType | m_BufferType |
unsigned char ** | m_BufferAddr |
unsigned long | m_MaxBufferSize |
unsigned long | m_BufferSize |
|
explicit |
ManagedBuffer::ManagedBuffer | ( | const ManagedBuffer & | source | ) |
ManagedBuffer::~ManagedBuffer | ( | ) |
void ManagedBuffer::allocate | ( | unsigned long | size | ) |
|
inline |
void ManagedBuffer::copyFrom | ( | const string & | source, |
const unsigned long | maxBufferSize = MAX_MESSAGE_LEN |
||
) |
void ManagedBuffer::copyFrom | ( | const unsigned char * | source, |
unsigned long | size, | ||
unsigned long | maxBufferSize = MAX_MESSAGE_LEN |
||
) |
void ManagedBuffer::copyFrom | ( | const ManagedBuffer & | source | ) |
void ManagedBuffer::copyFrom | ( | const ManagedBuffer * | source | ) |
ManagedBuffer ManagedBuffer::getRef | ( | ) |
|
inline |
ManagedBuffer ManagedBuffer::operator+ | ( | const unsigned long | offset | ) | const |
ManagedBuffer & ManagedBuffer::operator+= | ( | const unsigned long | offset | ) |
long ManagedBuffer::operator- | ( | const ManagedBuffer & | source | ) | const |
ManagedBuffer & ManagedBuffer::operator= | ( | const ManagedBuffer & | source | ) |
|
inline |
string ManagedBuffer::str | ( | ) | const |
string ManagedBuffer::str | ( | const string::size_type | size | ) | const |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |