 |
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;
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;
301 void Init(XnUInt32 nBaseSize =
BASE_SIZE)
304 m_nAllocatedSize = nBaseSize;
310 XnUInt32 m_nAllocatedSize;
313 #endif // __XNARRAY_H__
XnStatus Set(XnUInt32 nIndex, const T &val)
Definition: XnArray.h:238
T * Iterator
Definition: XnArray.h:60
XnStatus CopyFrom(const XnArray &other)
Definition: XnArray.h:91
XnArray & operator=(const XnArray &other)
Definition: XnArray.h:84
#define XN_VALIDATE_ALLOC_PTR(x)
Definition: XnOS.h:128
#define XN_IS_STATUS_OK(x)
Definition: XnMacros.h:60
#define XN_STATUS_OK
Definition: XnStatus.h:37
XnStatus SetSize(XnUInt32 nSize)
Definition: XnArray.h:175
XnStatus Reserve(XnUInt32 nReservedSize)
Definition: XnArray.h:128
XnUInt32 XnStatus
Definition: XnStatus.h:34
void Clear()
Definition: XnArray.h:276
XnStatus SetMinSize(XnUInt32 nSize)
Definition: XnArray.h:198
XnUInt32 GetSize() const
Definition: XnArray.h:168
T & operator[](XnUInt32 nIndex)
Definition: XnArray.h:283
@ BASE_SIZE
Definition: XnArray.h:77
#define XN_DELETE_ARR(p)
Definition: XnOS.h:337
const T * GetData() const
Definition: XnArray.h:115
#define XN_VALIDATE_INPUT_PTR(x)
Definition: XnOS.h:123
XnArray(XnUInt32 nBaseSize=BASE_SIZE)
Definition: XnArray.h:66
XnBool IsEmpty() const
Definition: XnArray.h:162
XnStatus AddLast(const T &val)
Definition: XnArray.h:256
Iterator begin()
Definition: XnArray.h:297
#define XN_NEW_ARR(type, count)
Definition: XnOS.h:335
virtual ~XnArray()
Definition: XnArray.h:78
Iterator end()
Definition: XnArray.h:309
XnStatus SetData(const T *pData, XnUInt32 nSize)
Definition: XnArray.h:102
const typedef T * ConstIterator
Definition: XnArray.h:63
XnUInt32 GetAllocatedSize() const
Definition: XnArray.h:230