![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cArray.h>
Public Member Functions | |
CArray () noexcept | |
CArray (THIS_t &&ref) noexcept | |
virtual | ~CArray () |
bool | IsValidMallocSize () const noexcept |
ITERATE_t | GetSize () const noexcept |
ITERATE_t | GetUpperBound () const noexcept |
bool | IsEmpty () const noexcept |
void | SetSize (ITERATE_t nNewSize) |
ITERATE_t | GetMallocSize () const noexcept |
void | RemoveAll () |
Clean up. More... | |
const TYPE & | GetAt (ITERATE_t nIndex) const |
TYPE & | ElementAt (ITERATE_t nIndex) |
void | SetAt (ITERATE_t nIndex, ARG_TYPE newElement) |
const TYPE * | GetData () const |
TYPE * | GetData () |
void | SetDataArrayPtr (TYPE *pData, ITERATE_t nSize) |
void | SetAtGrow (ITERATE_t nIndex, ARG_TYPE newElement) |
ITERATE_t | Add (ARG_TYPE newElement) |
void | Copy (const CArray &src) |
TYPE & | operator[] (ITERATE_t nIndex) |
const TYPE & | operator[] (ITERATE_t nIndex) const |
void | InsertAt (ITERATE_t nIndex, ARG_TYPE newElement) |
void | RemoveAt (ITERATE_t nIndex) |
void | RemoveAt (ITERATE_t nIndex, ITERATE_t iQty) |
void | MoveElement (ITERATE_t iFrom, ITERATE_t iTo) |
![]() | |
virtual | ~CObject () |
virtual bool | isValidCheck () const noexcept |
< memory allocation and structure definitions are valid. More... | |
virtual void | AssertValid () const |
< memory allocation and structure definitions are valid. More... | |
virtual void | Serialize (cArchive &a) |
Protected Member Functions | |
bool | IsValidIndex (ITERATE_t i) const noexcept |
Protected Attributes | |
TYPE * | m_pData |
the actual array of data More... | |
ITERATE_t | m_nSize |
Number of elements (upperBound - 1) More... | |
Minimal array template of elements. like MFC version.
|
inlinenoexcept |
|
inlinenoexcept |
move constructor.
|
inlinevirtual |
|
inline |
Add to the end.
void Gray::CArray< TYPE, ARG_TYPE >::Copy | ( | const CArray< TYPE, ARG_TYPE > & | src | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
Get quantity of objects truly allocated. (may not be whole number) like STL capacity()
|
inlinenoexcept |
|
inlinenoexcept |
void Gray::CArray< TYPE, ARG_TYPE >::InsertAt | ( | ITERATE_t | nIndex, |
ARG_TYPE | newElement | ||
) |
Insert at this location, move anything after this.
|
inlinenoexcept |
|
inlineprotectednoexcept |
|
noexcept |
void Gray::CArray< TYPE, ARG_TYPE >::MoveElement | ( | ITERATE_t | iFrom, |
ITERATE_t | iTo | ||
) |
Similar to Swap() but only one element is moved. (sort of) re-order the whole array. move an index to another place. dangerous for types that have internal pointers !
|
inline |
|
inline |
void Gray::CArray< TYPE, ARG_TYPE >::RemoveAll |
Clean up.
AKA SetEmpty, Empty
void Gray::CArray< TYPE, ARG_TYPE >::RemoveAt | ( | ITERATE_t | nIndex | ) |
void Gray::CArray< TYPE, ARG_TYPE >::RemoveAt | ( | ITERATE_t | nIndex, |
ITERATE_t | iQty | ||
) |
|
inline |
void Gray::CArray< TYPE, ARG_TYPE >::SetAtGrow | ( | ITERATE_t | nIndex, |
ARG_TYPE | newElement | ||
) |
|
inline |
set internal pointer. (dangerous)
void Gray::CArray< TYPE, ARG_TYPE >::SetSize | ( | ITERATE_t | nNewSize | ) |
|
protected |
Number of elements (upperBound - 1)
|
protected |
the actual array of data