Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cArrayVal< TYPE > Class Template Reference

#include <cArray.h>

Inheritance diagram for Gray::cArrayVal< TYPE >:
Gray::cArrayTyped< TYPE, TYPE > Gray::CArray< TYPE, ARG_TYPE > Gray::CObject

Public Member Functions

 cArrayVal ()
 
 cArrayVal (ITERATE_t iSize)
 
- Public Member Functions inherited from Gray::cArrayTyped< TYPE, TYPE >
void QSort ()
 
 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 TYPEGetAtSecure (ITERATE_t nIndex) const
 
TYPEElementAtSecure (ITERATE_t nIndex)
 
REF_t ConstElementAt (ITERATE_t nIndex) const
 
TYPEoperator[] (ITERATE_t nIndex)
 
const TYPEoperator[] (ITERATE_t nIndex) const
 
TYPEHead ()
 
TYPETail ()
 
TYPEElementAtHead ()
 
TYPEElementAtTail ()
 
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, TYPE > &aValues)
 
const cArrayTyped< TYPE, TYPE > & operator= (const cArrayTyped< TYPE, TYPE > &aValues)
 
ITERATE_t FindIFor (TYPE arg) const
 
bool HasArg (TYPE arg) const
 
void RemoveLast ()
 
ELEM_t PopHead ()
 
ELEM_t PopTail ()
 
bool RemoveArg (TYPE arg)
 
void UnLinkArg (TYPE arg)
 
ITERATE_t AddTail (TYPE newElement)
 
ITERATE_t PushTail (TYPE newElement)
 
void AddHead (TYPE newElement)
 
TYPEget_DataWork () const
 
void AddArray (const SUPER_t &src)
 
bool IsEqualArray (const SUPER_t &aValues) const
 
bool isArraySorted () const
 
bool isArraySortedND () const
 
- Public Member Functions inherited from Gray::CArray< TYPE, ARG_TYPE >
 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 TYPEGetAt (ITERATE_t nIndex) const
 
TYPEElementAt (ITERATE_t nIndex)
 
void SetAt (ITERATE_t nIndex, ARG_TYPE newElement)
 
const TYPEGetData () const
 
TYPEGetData ()
 
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)
 
TYPEoperator[] (ITERATE_t nIndex)
 
const TYPEoperator[] (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)
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 

Additional Inherited Members

- Public Types inherited from Gray::cArrayTyped< TYPE, TYPE >
typedef CArray< TYPE, TYPESUPER_t
 
typedef cArrayTyped< TYPE, TYPETHIS_t
 
typedef ITERATE_t iterator
 
typedef ITERATE_t const_iterator
 
typedef TYPE ELEM_t
 What type is stored. More...
 
typedef TYPE REF_t
 How to refer to this? value or ref or pointer? More...
 
- Protected Member Functions inherited from Gray::cArrayTyped< TYPE, TYPE >
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)
 
- Protected Member Functions inherited from Gray::CArray< TYPE, ARG_TYPE >
bool IsValidIndex (ITERATE_t i) const noexcept
 
- Protected Attributes inherited from Gray::CArray< TYPE, ARG_TYPE >
TYPEm_pData
 the actual array of data More...
 
ITERATE_t m_nSize
 Number of elements (upperBound - 1) More...
 

Detailed Description

template<class TYPE>
class Gray::cArrayVal< TYPE >

An array of some simple value type that is easy to copy. Using a Reference is a waste if the object is small. Just use a copy for small objects.

Constructor & Destructor Documentation

◆ cArrayVal() [1/2]

template<class TYPE >
Gray::cArrayVal< TYPE >::cArrayVal ( )
inline

◆ cArrayVal() [2/2]

template<class TYPE >
Gray::cArrayVal< TYPE >::cArrayVal ( ITERATE_t  iSize)
inlineexplicit

The documentation for this class was generated from the following file: