Torque::ByteBuffer Class Reference

#include <byteBuffer.h>

List of all members.

Public Member Functions

 ByteBuffer ()
 ByteBuffer (U8 *dataPtr, U32 bufferSize)
 Create a ByteBuffer from a chunk of memory.
 ByteBuffer (U32 bufferSize)
 Create a ByteBuffer of the specified size.
 ByteBuffer (const ByteBuffer &theBuffer)
 Copy constructor.
ByteBufferoperator= (const ByteBuffer &theBuffer)
 ~ByteBuffer ()
void setBuffer (U8 *dataPtr, U32 bufferSize, bool copyData)
 Set the ByteBuffer to point to a new chunk of memory.
void resize (U32 newBufferSize)
 Resize the buffer.
void appendBuffer (const U8 *dataBuffer, U32 bufferSize)
 Appends the specified buffer to the end of the byte buffer.
void appendBuffer (const ByteBuffer &theBuffer)
 Appends the specified ByteBuffer to the end of this byte buffer.
U32 getBufferSize () const
U8getBuffer ()
const U8getBuffer () const
ByteBuffer getCopy () const
 Copy the data in the buffer.
void clear ()
 Clear the buffer.

Private Attributes

PrivateBBData * _data


Constructor & Destructor Documentation

Torque::ByteBuffer::ByteBuffer (  ) 

Torque::ByteBuffer::ByteBuffer ( U8 dataPtr,
U32  bufferSize 
)

Create a ByteBuffer from a chunk of memory.

Torque::ByteBuffer::ByteBuffer ( U32  bufferSize  ) 

Create a ByteBuffer of the specified size.

Torque::ByteBuffer::ByteBuffer ( const ByteBuffer theBuffer  ) 

Copy constructor.

Torque::ByteBuffer::~ByteBuffer (  ) 


Member Function Documentation

ByteBuffer& Torque::ByteBuffer::operator= ( const ByteBuffer theBuffer  ) 

void Torque::ByteBuffer::setBuffer ( U8 dataPtr,
U32  bufferSize,
bool  copyData 
)

Set the ByteBuffer to point to a new chunk of memory.

void Torque::ByteBuffer::resize ( U32  newBufferSize  ) 

Resize the buffer.

void Torque::ByteBuffer::appendBuffer ( const U8 dataBuffer,
U32  bufferSize 
)

Appends the specified buffer to the end of the byte buffer.

void Torque::ByteBuffer::appendBuffer ( const ByteBuffer theBuffer  )  [inline]

Appends the specified ByteBuffer to the end of this byte buffer.

U32 Torque::ByteBuffer::getBufferSize (  )  const

U8* Torque::ByteBuffer::getBuffer (  ) 

const U8* Torque::ByteBuffer::getBuffer (  )  const

ByteBuffer Torque::ByteBuffer::getCopy (  )  const

Copy the data in the buffer.

void Torque::ByteBuffer::clear (  ) 

Clear the buffer.


Member Data Documentation

PrivateBBData* Torque::ByteBuffer::_data [private]