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

#include <cArraySort.h>

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

Public Types

typedef cArraySorted< TYPE, TYPE, TYPESUPER_t
 
typedef SUPER_t::KEY_t KEY_t
 
typedef SUPER_t::REF_t REF_t
 
- Public Types inherited from Gray::cArraySorted< TYPE, TYPE, TYPE >
typedef cArrayTyped< TYPE, TYPESUPER_t
 
typedef TYPE KEY_t
 
typedef SUPER_t::REF_t REF_t
 
- 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...
 

Public Member Functions

virtual ~cArraySortVal ()
 
bool RemoveArgKey (TYPE Data1)
 
- Public Member Functions inherited from Gray::cArraySorted< TYPE, TYPE, TYPE >
virtual ~cArraySorted ()
 
ITERATE_t FindINear (REF_t pNew, COMPARE_t &iCompareRes) const
 
ITERATE_t FindINearKey (KEY_t key, COMPARE_t &iCompareRes) const
 
ITERATE_t FindIForKey (KEY_t key) const
 
ITERATE_t FindIFirstForKey (TYPE nKey) const
 
ITERATE_t FindILastForKey (TYPE nKey) const
 
ITERATE_t AddPresorted (ITERATE_t index, COMPARE_t iCompareRes, TYPE pNew)
 
bool RemoveKey (TYPE key)
 
ITERATE_t Add (TYPE pNew)
 
void AddArray (const SUPER_t &a)
 
- 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)
 

Protected Member Functions

virtual COMPARE_t CompareData (REF_t Data1, REF_t Data2) const noexcept override
 
virtual COMPARE_t CompareKey (KEY_t Data1, REF_t Data2) const override
 
- Protected Member Functions inherited from Gray::cArraySorted< TYPE, TYPE, TYPE >
virtual COMPARE_t CompareKey (KEY_t key1, REF_t Data2) const
 
bool RemoveArgKey (REF_t pObj, KEY_t key)
 
- 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
 

Additional Inherited Members

- 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::cArraySortVal< TYPE >

A sorted array of some native/simple TYPE of values (NOT Pointers) No duplicates allowed. ASSUME TYPE supports cValT::Compare() DEFAULT = sort is low to high

Member Typedef Documentation

◆ KEY_t

template<class TYPE >
typedef SUPER_t::KEY_t Gray::cArraySortVal< TYPE >::KEY_t

◆ REF_t

template<class TYPE >
typedef SUPER_t::REF_t Gray::cArraySortVal< TYPE >::REF_t

◆ SUPER_t

template<class TYPE >
typedef cArraySorted<TYPE, TYPE, TYPE> Gray::cArraySortVal< TYPE >::SUPER_t

Constructor & Destructor Documentation

◆ ~cArraySortVal()

template<class TYPE >
virtual Gray::cArraySortVal< TYPE >::~cArraySortVal ( )
inlinevirtual

Member Function Documentation

◆ CompareData()

template<class TYPE >
virtual COMPARE_t Gray::cArraySortVal< TYPE >::CompareData ( REF_t  Data1,
REF_t  Data2 
) const
inlineoverrideprotectedvirtualnoexcept

◆ CompareKey()

template<class TYPE >
virtual COMPARE_t Gray::cArraySortVal< TYPE >::CompareKey ( KEY_t  Data1,
REF_t  Data2 
) const
inlineoverrideprotectedvirtual

◆ RemoveArgKey()

template<class TYPE >
bool Gray::cArraySortVal< TYPE >::RemoveArgKey ( TYPE  Data1)
inline

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