 |
OpenNI 1.5.4
|
Go to the documentation of this file.
52 XnArray(
const XnArray& other) : m_pData(NULL), m_nSize(0), m_nAllocatedSize(0)
87 for (XnUInt32 i = 0; i < nSize; i++)
89 m_pData[i] = pData[i];
110 if (nReservedSize > m_nAllocatedSize)
114 nReservedSize = (nReservedSize >> 1) | nReservedSize;
115 nReservedSize = (nReservedSize >> 2) | nReservedSize;
116 nReservedSize = (nReservedSize >> 4) | nReservedSize;
117 nReservedSize = (nReservedSize >> 8) | nReservedSize;
118 nReservedSize = (nReservedSize >> 16) | nReservedSize;
126 for (XnUInt32 i = 0; i < m_nSize; i++)
128 pNewData[i] = m_pData[i];
136 m_nAllocatedSize = nReservedSize;
144 return (m_nSize == 0);
198 for (XnUInt32 i = m_nSize; i < nSize; i++)
200 m_pData[i] = fillVal;
212 return m_nAllocatedSize;
222 m_pData[nIndex] = val;
227 XnStatus Set(XnUInt32 nIndex,
const T& val,
const T& fillVal)
231 m_pData[nIndex] = val;
238 return Set(m_nSize, val);
248 for (XnUInt32 i = 0; i < nCount; ++i)
250 m_pData[nOffset + i] = aValues[i];
265 XN_ASSERT(nIndex < m_nSize);
266 return m_pData[nIndex];
272 XN_ASSERT(nIndex < m_nSize);
273 return m_pData[nIndex];
291 return m_pData + m_nSize;
297 return m_pData + m_nSize;
304 m_nAllocatedSize = nBaseSize;
310 XnUInt32 m_nAllocatedSize;
313 #endif // __XNARRAY_H__
XnStatus Set(XnUInt32 nIndex, const T &val)
Definition: XnArray.h:236
T * Iterator
Definition: XnArray.h:58
XnStatus CopyFrom(const XnArray &other)
Definition: XnArray.h:89
XnArray & operator=(const XnArray &other)
Definition: XnArray.h:82
#define XN_VALIDATE_ALLOC_PTR(x)
Definition: XnOS.h:127
#define XN_IS_STATUS_OK(x)
Definition: XnMacros.h:59
#define XN_STATUS_OK
Definition: XnStatus.h:36
XnStatus SetSize(XnUInt32 nSize)
Definition: XnArray.h:173
XnStatus Reserve(XnUInt32 nReservedSize)
Definition: XnArray.h:126
XnUInt32 XnStatus
Definition: XnStatus.h:33
void Clear()
Definition: XnArray.h:274
XnStatus SetMinSize(XnUInt32 nSize)
Definition: XnArray.h:196
XnUInt32 GetSize() const
Definition: XnArray.h:166
T & operator[](XnUInt32 nIndex)
Definition: XnArray.h:281
#define XN_DELETE_ARR(p)
Definition: XnOS.h:336
const T * GetData() const
Definition: XnArray.h:113
#define XN_VALIDATE_INPUT_PTR(x)
Definition: XnOS.h:122
XnArray(XnUInt32 nBaseSize=BASE_SIZE)
Definition: XnArray.h:64
XnBool IsEmpty() const
Definition: XnArray.h:160
XnStatus AddLast(const T &val)
Definition: XnArray.h:254
Iterator begin()
Definition: XnArray.h:295
#define XN_NEW_ARR(type, count)
Definition: XnOS.h:334
virtual ~XnArray()
Definition: XnArray.h:76
Iterator end()
Definition: XnArray.h:307
XnStatus SetData(const T *pData, XnUInt32 nSize)
Definition: XnArray.h:100
const typedef T * ConstIterator
Definition: XnArray.h:61
XnUInt32 GetAllocatedSize() const
Definition: XnArray.h:228