![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cArray.h>
Public Types | |
typedef CArray< TYPE, ARG_TYPE > | SUPER_t |
typedef cArrayTyped< TYPE, ARG_TYPE > | THIS_t |
typedef ITERATE_t | iterator |
typedef ITERATE_t | const_iterator |
typedef TYPE | ELEM_t |
What type is stored. More... | |
typedef ARG_TYPE | REF_t |
How to refer to this? value or ref or pointer? More... | |
Public Member Functions | |
cArrayTyped () noexcept | |
cArrayTyped (const THIS_t &rArray) | |
cArrayTyped (ITERATE_t iSize) | |
virtual | ~cArrayTyped () |
bool | isValidCheck () const noexcept |
< memory allocation and structure definitions are valid. More... | |
bool | IsValidIndex (ITERATE_t i) const noexcept |
ITERATE_t | ClampValidIndex (ITERATE_t i) const noexcept |
size_t | GetHeapStats (OUT ITERATE_t &iAllocCount) const noexcept |
void | AssertValidIndex (ITERATE_t nIndex) const |
const TYPE & | GetAtSecure (ITERATE_t nIndex) const |
TYPE & | ElementAtSecure (ITERATE_t nIndex) |
REF_t | ConstElementAt (ITERATE_t nIndex) const |
TYPE & | operator[] (ITERATE_t nIndex) |
const TYPE & | operator[] (ITERATE_t nIndex) const |
TYPE & | Head () |
TYPE & | Tail () |
TYPE & | ElementAtHead () |
TYPE & | ElementAtTail () |
REF_t | ConstHead () const |
REF_t | ConstTail () const |
REF_t | GetAtTail () |
void | UnLinkIndex (ITERATE_t nIndex) |
void | Swap (ITERATE_t i, ITERATE_t j) |
void | SetCopy (const cArrayTyped< TYPE, ARG_TYPE > &aValues) |
const cArrayTyped< TYPE, ARG_TYPE > & | operator= (const cArrayTyped< TYPE, ARG_TYPE > &aValues) |
ITERATE_t | FindIFor (ARG_TYPE arg) const |
bool | HasArg (ARG_TYPE arg) const |
void | RemoveLast () |
ELEM_t | PopHead () |
ELEM_t | PopTail () |
bool | RemoveArg (ARG_TYPE arg) |
void | UnLinkArg (ARG_TYPE arg) |
ITERATE_t | AddTail (ARG_TYPE newElement) |
ITERATE_t | PushTail (ARG_TYPE newElement) |
void | AddHead (ARG_TYPE newElement) |
TYPE * | get_DataWork () const |
void | AddArray (const SUPER_t &src) |
bool | IsEqualArray (const SUPER_t &aValues) const |
bool | isArraySorted () const |
bool | isArraySortedND () const |
void | QSort () |
![]() | |
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, const TYPE & newElement) |
const TYPE * | GetData () const |
TYPE * | GetData () |
void | SetDataArrayPtr (TYPE *pData, ITERATE_t nSize) |
void | SetAtGrow (ITERATE_t nIndex, const TYPE & newElement) |
ITERATE_t | Add (const TYPE & newElement) |
void | Copy (const CArray &src) |
TYPE & | operator[] (ITERATE_t nIndex) |
const TYPE & | operator[] (ITERATE_t nIndex) const |
void | InsertAt (ITERATE_t nIndex, const 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 void | AssertValid () const |
< memory allocation and structure definitions are valid. More... | |
virtual void | Serialize (cArchive &a) |
Protected Member Functions | |
virtual COMPARE_t | CompareData (REF_t Data1, REF_t Data2) const noexcept |
ITERATE_t | QSortPartition (ITERATE_t iLeft, ITERATE_t iRight) |
void | QSort (ITERATE_t iLeft, ITERATE_t iRight) |
![]() | |
bool | IsValidIndex (ITERATE_t i) const noexcept |
Additional Inherited Members | |
![]() | |
TYPE * | m_pData |
the actual array of data More... | |
ITERATE_t | m_nSize |
Number of elements (upperBound - 1) More... | |
Equivalent to MFC CArray with added functions not in MFC TYPE = the type stored. ARG_TYPE = how it should be referenced. const TYPE& typically
typedef ITERATE_t Gray::cArrayTyped< TYPE, ARG_TYPE >::const_iterator |
typedef TYPE Gray::cArrayTyped< TYPE, ARG_TYPE >::ELEM_t |
What type is stored.
typedef ITERATE_t Gray::cArrayTyped< TYPE, ARG_TYPE >::iterator |
typedef ARG_TYPE Gray::cArrayTyped< TYPE, ARG_TYPE >::REF_t |
How to refer to this? value or ref or pointer?
typedef CArray<TYPE, ARG_TYPE> Gray::cArrayTyped< TYPE, ARG_TYPE >::SUPER_t |
typedef cArrayTyped<TYPE, ARG_TYPE> Gray::cArrayTyped< TYPE, ARG_TYPE >::THIS_t |
|
inlinenoexcept |
|
inline |
Force copies to be explicit!
|
inlineexplicit |
|
inlinevirtual |
|
inline |
Append an array to the end of this. Like MFC CArray::Append()
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlineprotectedvirtualnoexcept |
Compare a data record to another data record. ASSUME this is the same as comparing keys. Otherwise you must overload this. Default implementation. Override this for proper implementation. This probably won't work for most cases.
Reimplemented in Gray::cArraySortString< _TYPE_CH >, Gray::cArraySortString< TYPE >, Gray::cArraySortString< FILECHAR_t >, Gray::cArraySortName< GrayLib::cFileChangeElem >, Gray::cArraySortName< GrayGUI::cXCheckBox >, Gray::cArraySortName< GrayLib::cSyncOp >, Gray::cArraySortName< Gray3D::cXTextureFile >, Gray::cArraySortName< GrayLib::cSQLDriver, char >, Gray::cArraySortName< TYPE, TCHAR >, Gray::cArraySortName< GrayLib::cScriptablePropDynamic >, Gray::cArraySortName< GrayLib::cManifestElem >, Gray::cArraySortName< GrayLib::cLogFileTail >, Gray::cArraySortName< GrayLib::cTimeScheduleSpecialEval, char >, Gray::cArraySortName< Gray::cAtomDef, ATOMCHAR_t >, Gray::cArraySortValue< Gray::cMemPage, UINT_PTR >, Gray::cArraySortValue< GrayLib::cTimerInst, TIMESYS_t >, Gray::cArraySortValue< cXObjEventSink, EVENTPRI_TYPE >, Gray::cArraySortValue< TYPE, ITERATE_t >, Gray::cArraySortHash< GrayGUI::cXDialogPlacementObj >, Gray::cArraySortHash< GrayLib::cNetServerConnection >, Gray::cArraySortHash< GrayLib::cTimerInst, HASHCODE_t >, Gray::cArraySortHash< GrayLib::cNetHostRangeX4 >, Gray::cArraySortHash< GrayLib::cVarTuple, ATOMCODE_t >, Gray::cArraySortHash< GrayLib::cThread, THREADID_t >, Gray::cArraySortHash< GrayLib::cNetServerPort >, Gray::cArraySortHash< GrayJS::cJSXObject >, Gray::cArraySortHash< Gray::cAtomDef, ATOMCODE_t >, Gray::cArraySortPtrName< TYPE, _TYPECH >, Gray::cArraySortFacadeHash< TYPE, TYPE_PTR, _TYPE_HASH >, Gray::cArraySortFacadeValue< TYPE, TYPE_PTR, TYPE_KEY >, Gray::cArraySortFacade< TYPE, TYPE_PTR, TYPE_KEY >, Gray::cArraySortFacade< cRefPtr< TYPE >, TYPE *, TYPE_KEY >, Gray::cArraySortFacade< TYPE *, TYPE *, const GChar_t * >, Gray::cArraySortFacade< TYPE, TYPE_PTR, HASHCODE_t >, Gray::cArrayFacade< TYPE *, TYPE * >, Gray::cArrayFacade< cNewPtr< TYPE >, TYPE * >, Gray::cArrayFacade< cRefPtr< TYPE >, TYPE * >, Gray::cArrayFacade< cIUnkPtr< TYPE >, TYPE * >, Gray::cPairSortStr< _TYPE_A, _TYPE_B >, Gray::cPairSortBase< _TYPE_PAIR, _TYPE_KEY >, Gray::cPairSortBase< cPair< _TYPE_A, _TYPE_B >, const ATOMCHAR_t * >, Gray::cPairSortBase< cPair< _TYPE_A, _TYPE_B >, _TYPE_A >, Gray::cArraySortStructHash< GrayLib::cTextLocEntry >, Gray::cArraySortStructHash< cIniKeyValue >, Gray::cArraySortStructHash< TYPE_INST, THREADID_t >, Gray::cArraySortStructHash< GrayLib::cMailTag >, Gray::cArraySortStructHash< GrayLib::cHttpHeadTag >, Gray::cArraySortStructHash< CMapKey, HASHCODE_t >, Gray::cArraySortStructHash< cAtomRef, ATOMCODE_t >, Gray::cArraySortVal< UID_t >, Gray::cArraySortVal< UIDINDEX_t >, Gray::cArraySortVal< SCRIPTINTERFACEID_t >, and Gray::cArraySortVal< Gray::cPtrTrace * >.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
throw an exception if we are out or range.
|
inline |
|
inline |
Find the index of a specified entry arg.
|
inline |
|
inline |
throw an exception if we are out or range.
|
inline |
|
inlinenoexcept |
|
inline |
Find the index of a specified entry.
|
inline |
bool Gray::cArrayTyped< TYPE, ARG_TYPE >::isArraySorted |
Hard check for sorted. Allow dupes!
bool Gray::cArrayTyped< TYPE, ARG_TYPE >::isArraySortedND |
Hard check for sorted. Allow NO dupes!
|
inline |
Compare 2 arrays, just look for the first not same.
|
inlinevirtualnoexcept |
< memory allocation and structure definitions are valid.
NOT in MFC so use COBJECT_IsValidCheck to call.
Reimplemented from Gray::CObject.
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Re-sort- might have become unsorted for some reason. similar to std::sort()
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
like cMemT::Swap(). dangerous for types that have pointers to themselves. self referenced.
|
inline |
|
inline |
|
inline |
Remove the object from the list. DO NOT call its normal destructor!