2template <
typename T, plUInt32 C>
5 PL_ASSERT_DEBUG(this->m_pElements ==
nullptr,
"static arrays should not use m_pElements");
6 this->m_uiCapacity = C;
9template <
typename T, plUInt32 C>
12 PL_ASSERT_DEBUG(this->m_pElements ==
nullptr,
"static arrays should not use m_pElements");
13 this->m_uiCapacity = C;
17template <
typename T, plUInt32 C>
18template <plUInt32 OtherCapacity>
21 static_assert(OtherCapacity <= C);
23 PL_ASSERT_DEBUG(this->m_pElements ==
nullptr,
"static arrays should not use m_pElements");
24 this->m_uiCapacity = C;
29template <
typename T, plUInt32 C>
32 PL_ASSERT_DEBUG(this->m_pElements ==
nullptr,
"static arrays should not use m_pElements");
33 this->m_uiCapacity = C;
38template <
typename T, plUInt32 C>
42 PL_ASSERT_DEBUG(this->m_pElements ==
nullptr,
"static arrays should not use m_pElements");
45template <
typename T, plUInt32 C>
48 return reinterpret_cast<T*
>(m_Data);
51template <
typename T, plUInt32 C>
54 return reinterpret_cast<const T*
>(m_Data);
57template <
typename T, plUInt32 C>
60 PL_ASSERT_DEV(uiCapacity <= C,
"The static array has a fixed capacity of {0}, cannot reserve more elements than that.", C);
64template <
typename T, plUInt32 C>
70template <
typename T, plUInt32 C>
71template <plUInt32 OtherCapacity>
77template <
typename T, plUInt32 C>
83template <
typename T, plUInt32 C>
86 return GetStaticArray();
89template <
typename T, plUInt32 C>
92 return GetStaticArray();
Base class for all array containers. Implements all the basic functionality that only requires a poin...
Definition ArrayBase.h:19
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
Wraps a C-style array, which has a fixed size at compile-time, with a more convenient interface.
Definition StaticArray.h:13
void Reserve(plUInt32 uiCapacity)
For the static array Reserve is a no-op. However the function checks if the requested capacity is bel...
Definition StaticArray_inl.h:58
plStaticArray()
Creates an empty array.
Definition StaticArray_inl.h:3
~plStaticArray()
Destroys all objects.
Definition StaticArray_inl.h:39
void operator=(const plStaticArray< T, Capacity > &rhs)
Copies the data from some other contiguous array into this one.