Torque2D Reference
Loading...
Searching...
No Matches
RawDataT< T > Class Template Reference

#include <rawData.h>

Public Types

typedef void Parent
typedef RawDataT< T > ThisType
typedef T ValueType
 Type of elements in the buffer.

Public Member Functions

 RawDataT ()
 RawDataT (T *data, U32 size, bool ownMemory=false)
 RawDataT (const ThisType &rd)
 ~RawDataT ()
void reset ()
void alloc (const U32 newSize)
void operator= (const ThisType &rd)

Static Public Member Functions

template<class Self>
static Self * allocInline (U32 numElements TORQUE_TMM_ARGS_DECL)

Public Attributes

bool ownMemory
T * data
 The data buffer.
U32 size
 Number of elements in the buffer.

Member Typedef Documentation

◆ Parent

template<typename T>
typedef void Parent

◆ ThisType

template<typename T>
typedef RawDataT< T > ThisType

◆ ValueType

template<typename T>
typedef T ValueType

Type of elements in the buffer.

Constructor & Destructor Documentation

◆ RawDataT() [1/3]

template<typename T>
RawDataT ( )
inline

◆ RawDataT() [2/3]

template<typename T>
RawDataT ( T * data,
U32 size,
bool ownMemory = false )
inline

◆ RawDataT() [3/3]

template<typename T>
RawDataT ( const ThisType & rd)
inline

◆ ~RawDataT()

template<typename T>
~RawDataT ( )
inline

Member Function Documentation

◆ alloc()

template<typename T>
void alloc ( const U32 newSize)
inline

◆ allocInline()

template<typename T>
template<class Self>
Self * allocInline ( U32 numElements TORQUE_TMM_ARGS_DECL)
inlinestatic

Allocate a RawDataT instance inline with its data elements.

Parameters
SelfRawDataT instance type; this is a type parameter so this can work with types derived from RawDataT.

◆ operator=()

template<typename T>
void operator= ( const ThisType & rd)
inline

◆ reset()

template<typename T>
void reset ( )
inline

Member Data Documentation

◆ data

template<typename T>
T* data

The data buffer.

◆ ownMemory

template<typename T>
bool ownMemory

If true, the structure own the data buffer and will delete[] it on destruction.

◆ size

template<typename T>
U32 size

Number of elements in the buffer.


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