AlignedArray< T > Class Template Reference#include <tAlignedArray.h>
Inheritance diagram for AlignedArray< T >: ![]() Detailed Description
This is a fixed size class that will align its elements on configurable boundaries.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| AlignedArray () | |
| AlignedArray (const U32 arraySize, const U32 elementSize) | |
| Create an AlignedArray. | |
| AlignedArray (const U32 arraySize, const U32 elementSize, U8 *buffer, bool takeOwn) | |
| Create an AlignedArray. | |
| ~AlignedArray () | |
| void | setCapacity (const U32 arraySize, const U32 elementSize) |
| void | setCapacity (const U32 arraySize, const U32 elementSize, U8 *buffer, bool takeOwn) |
| U32 | size () const |
| Size of the array. | |
| void | setSize (U32 newsize) |
| Set a new array size (up to initial size created returned by capacity). | |
| U32 | capacity () const |
| Capacity of the array (you can setCapacity the size this high). | |
| U32 | getElementSize () const |
| Returns the size of an element (useful for asserting, etc). | |
| const void * | getBuffer () const |
| T & | operator[] (const U32) |
| const T & | operator[] (const U32) const |
Protected Attributes | |
| U32 | mElementSize |
| U32 | mElementCount |
| U32 | mCapacity |
| U8 * | mBuffer |
| bool | mOwnBuffer |
| AlignedArray< T >::AlignedArray | ( | ) | [inline] |
| AlignedArray< T >::AlignedArray | ( | const U32 | arraySize, | |
| const U32 | elementSize | |||
| ) | [inline] |
Create an AlignedArray.
| arraySize | How many items | |
| elementSize | Size of each element (including padding) |
| AlignedArray< T >::AlignedArray | ( | const U32 | arraySize, | |
| const U32 | elementSize, | |||
| U8 * | buffer, | |||
| bool | takeOwn | |||
| ) | [inline] |
Create an AlignedArray.
| arraySize | How many items | |
| elementSize | Size of each element (including padding) | |
| buffer | Preallocated buffer (with data and aligned on elementSize boundaries) | |
| takeOwn | If true, this class will take ownership of the buffer and free on destruct |
| AlignedArray< T >::~AlignedArray | ( | ) | [inline] |
| void AlignedArray< T >::setCapacity | ( | const U32 | arraySize, | |
| const U32 | elementSize | |||
| ) | [inline] |
| void AlignedArray< T >::setCapacity | ( | const U32 | arraySize, | |
| const U32 | elementSize, | |||
| U8 * | buffer, | |||
| bool | takeOwn | |||
| ) | [inline] |
| U32 AlignedArray< T >::size | ( | ) | const [inline] |
Size of the array.
| void AlignedArray< T >::setSize | ( | U32 | newsize | ) | [inline] |
Set a new array size (up to initial size created returned by capacity).
| U32 AlignedArray< T >::capacity | ( | ) | const [inline] |
Capacity of the array (you can setCapacity the size this high).
| U32 AlignedArray< T >::getElementSize | ( | ) | const |
Returns the size of an element (useful for asserting, etc).
| const void * AlignedArray< T >::getBuffer | ( | ) | const |
| T & AlignedArray< T >::operator[] | ( | const | U32 | ) | [inline] |
| const T & AlignedArray< T >::operator[] | ( | const | U32 | ) | const [inline] |
U32 AlignedArray< T >::mElementSize [protected] |
U32 AlignedArray< T >::mElementCount [protected] |
U32 AlignedArray< T >::mCapacity [protected] |
U8* AlignedArray< T >::mBuffer [protected] |
bool AlignedArray< T >::mOwnBuffer [protected] |