OpenNI 1.3.2
|
#include <XnArray.h>
Public Types | |
enum | { BASE_SIZE = 8 } |
typedef T * | Iterator |
typedef const T * | ConstIterator |
Public Member Functions | |
XnArray () | |
XnArray (const XnArray &other) | |
virtual | ~XnArray () |
XnArray & | operator= (const XnArray &other) |
XnStatus | CopyFrom (const XnArray &other) |
XnStatus | SetData (const T *pData, XnUInt32 nSize) |
const T * | GetData () const |
T * | GetData () |
XnStatus | Reserve (XnUInt32 nReservedSize) |
XnBool | IsEmpty () const |
XnUInt32 | GetSize () const |
XnStatus | SetSize (XnUInt32 nSize) |
XnStatus | SetSize (XnUInt32 nSize, const T &fillVal) |
XnStatus | SetMinSize (XnUInt32 nSize) |
XnStatus | SetMinSize (XnUInt32 nSize, const T &fillVal) |
XnUInt32 | GetAllocatedSize () const |
XnStatus | Set (XnUInt32 nIndex, const T &val) |
XnStatus | Set (XnUInt32 nIndex, const T &val, const T &fillVal) |
XnStatus | AddLast (const T &val) |
XnStatus | AddLast (const T *aValues, XnUInt32 nCount) |
void | Clear () |
T & | operator[] (XnUInt32 nIndex) |
const T & | operator[] (XnUInt32 nIndex) const |
Iterator | begin () |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
typedef const T* XnArray< T >::ConstIterator |
A constant iterator object that allows you to iterate over members in the array as read-only values.
An iterator object that allows you to iterate over members in the array.
Default constructor. Initializes the array to BASE_SIZE.
Copy constructor. Initializes this array from another array of the same type.
Destructor. Deallocates data in this array.
Adds one element to the end of this array.
Adds a range of values to the end of this array.
ConstIterator XnArray< T >::begin | ( | ) | const [inline] |
Resets the data of this array and sets its size to 0.
Copies data from another array of the same type.
ConstIterator XnArray< T >::end | ( | ) | const [inline] |
XnUInt32 XnArray< T >::GetAllocatedSize | ( | ) | const [inline] |
Assignment operator. Copies data from another array of the same type.
T& XnArray< T >::operator[] | ( | XnUInt32 | nIndex | ) | [inline] |
Element access operator. Returns a modifiable reference to the element at specified index.
const T& XnArray< T >::operator[] | ( | XnUInt32 | nIndex | ) | const [inline] |
Element access operator. Returns a const reference to the element at specified index.
Reserves space in this array for the specified number of elements. This saves you re-allocations and data copies if you know the size in advance.
Sets value at specified index, grows array if needed. Note that when dealing with primitive types and adding beyond the current size of the array, any added values that fill the gap are uninitialized
XnStatus XnArray< T >::Set | ( | XnUInt32 | nIndex, |
const T & | val, | ||
const T & | fillVal | ||
) | [inline] |
Sets value at specified index and grows array if needed, filling any resulting blank elements with fillVal.
Copies data from a raw buffer of the same type pointed to by pData, and sets size to nSize.
XnStatus XnArray< T >::SetMinSize | ( | XnUInt32 | nSize | ) | [inline] |
Makes sure the array has at least nSize elements. If nSize is less than the current size, there is no effect. Note that for primitive types, any added elements are uninitialized.
XnStatus XnArray< T >::SetMinSize | ( | XnUInt32 | nSize, |
const T & | fillVal | ||
) | [inline] |
Makes sure the array has at least nSize elements. If nSize is less than the current size, there is no effect. Any added elements are initialized by the value specified by fillVal.
Sets the size of this array to the specified number of elements. Note that for primitive types, the data is uninitialized.
Sets the size of this array to the specified number of elements, initializing all elements with the value specified by fillVal.