Torque2D Reference
Loading...
Searching...
No Matches
ByteBuffer Class Reference

#include <byteBuffer.h>

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
U8 * getBuffer ()
const U8 * getBuffer () const
ByteBuffer getCopy () const
 Copy the data in the buffer.
void clear ()
 Clear the buffer.

Constructor & Destructor Documentation

◆ ByteBuffer() [1/4]

ByteBuffer ( )

◆ ByteBuffer() [2/4]

ByteBuffer ( U8 * dataPtr,
U32 bufferSize )

Create a ByteBuffer from a chunk of memory.

◆ ByteBuffer() [3/4]

ByteBuffer ( U32 bufferSize)

Create a ByteBuffer of the specified size.

◆ ByteBuffer() [4/4]

ByteBuffer ( const ByteBuffer & theBuffer)

Copy constructor.

◆ ~ByteBuffer()

~ByteBuffer ( )

Member Function Documentation

◆ appendBuffer() [1/2]

void appendBuffer ( const ByteBuffer & theBuffer)
inline

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

◆ appendBuffer() [2/2]

void appendBuffer ( const U8 * dataBuffer,
U32 bufferSize )

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

◆ clear()

void clear ( )

Clear the buffer.

◆ getBuffer() [1/2]

U8 * getBuffer ( )

◆ getBuffer() [2/2]

const U8 * getBuffer ( ) const

◆ getBufferSize()

U32 getBufferSize ( ) const

◆ getCopy()

ByteBuffer getCopy ( ) const

Copy the data in the buffer.

◆ operator=()

ByteBuffer & operator= ( const ByteBuffer & theBuffer)

◆ resize()

void resize ( U32 newBufferSize)

Resize the buffer.

◆ setBuffer()

void setBuffer ( U8 * dataPtr,
U32 bufferSize,
bool copyData )

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


The documentation for this class was generated from the following files: