![]() |
PandaRoot
|
#include <PndCAArray.h>
Public Types | |
typedef PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type | T2 |
typedef PndCAInternal::ArrayBase< T2, Dim > | Parent |
![]() | |
typedef PndCAInternal::ArrayBase< PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type, Dim > | Parent |
Public Member Functions | |
PndCAResizableArray () | |
PndCAResizableArray (int x) | |
PndCAResizableArray (int x, int y) | |
PndCAResizableArray (int x, int y, int z) | |
~PndCAResizableArray () | |
void | Resize (int x) |
void | Resize (int x, int y) |
void | Resize (int x, int y, int z) |
![]() | |
int | Size () const |
operator bool () const | |
bool | IsValid () const |
PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type & | operator* () |
const PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type & | operator* () const |
PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type * | Data () |
const PndCAInternal::TypeForAlignmentHelper< T, alignment >::Type * | Data () const |
PndCAArray | operator+ (int x) const |
PndCAArray | operator- (int x) const |
PndCAArray< Other, Dim > | ReinterpretCast () const |
Owns the data. When it goes out of scope the data is freed.
The memory is allocated on the heap.
Instantiate this class on the stack. Allocation on the heap is disallowed.
T | type of the entries in the array. |
Dim | selects the operator[]/operator() behavior it should have. I.e. makes it behave like a 1-, 2- or 3-dim array. (defaults to 1) |
alignment | Defaults to 0 (default alignment). Other valid values are any multiples of 2. This is especially useful for aligning data for SIMD vectors. |
Example:
Definition at line 577 of file PndCAArray.h.
typedef PndCAInternal::ArrayBase<T2, Dim> PndCAResizableArray< T, Dim, alignment >::Parent |
Definition at line 580 of file PndCAArray.h.
typedef PndCAInternal::TypeForAlignmentHelper<T, alignment>::Type PndCAResizableArray< T, Dim, alignment >::T2 |
Definition at line 579 of file PndCAArray.h.
|
inline |
does not allocate any memory
Definition at line 781 of file PndCAArray.h.
|
inline |
use for 1-dim arrays: allocates x * sizeof(T) bytes for the array
Definition at line 788 of file PndCAArray.h.
References ALIHLTARRAY_STATIC_ASSERT, and PndCAInternal::Allocator< T, alignment >::Alloc().
|
inline |
use for 2-dim arrays: allocates x * y * sizeof(T) bytes for the array
Definition at line 796 of file PndCAArray.h.
References ALIHLTARRAY_STATIC_ASSERT, and PndCAInternal::Allocator< T, alignment >::Alloc().
|
inline |
use for 3-dim arrays: allocates x * y * z * sizeof(T) bytes for the array
Definition at line 804 of file PndCAArray.h.
References ALIHLTARRAY_STATIC_ASSERT, and PndCAInternal::Allocator< T, alignment >::Alloc().
|
inline |
frees the data
Definition at line 601 of file PndCAArray.h.
References PndCAInternal::Allocator< T, alignment >::Free().
|
inline |
use for 1-dim arrays: resizes the memory for the array to x * sizeof(T) bytes.
Definition at line 813 of file PndCAArray.h.
References ALIHLTARRAY_STATIC_ASSERT, and PndCAInternal::Allocator< T, alignment >::Free().
|
inline |
use for 2-dim arrays: resizes the memory for the array to x * y * sizeof(T) bytes.
Definition at line 822 of file PndCAArray.h.
References ALIHLTARRAY_STATIC_ASSERT, and PndCAInternal::Allocator< T, alignment >::Free().
|
inline |
use for 3-dim arrays: resizes the memory for the array to x * y * z * sizeof(T) bytes.
Definition at line 831 of file PndCAArray.h.
References ALIHLTARRAY_STATIC_ASSERT, and PndCAInternal::Allocator< T, alignment >::Free().