Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cVariantArray Class Reference

#include <cVariantData.h>

Inheritance diagram for GrayLib::cVariantArray:
Gray::cArrayStruct< cVariant > GrayLib::cVariantCommon Gray::cArrayTyped< TYPE, ARG_TYPE > Gray::CArray< TYPE, const TYPE & > Gray::CObject

Public Member Functions

 cVariantArray (ITERATE_t iSize=0)
 
 cVariantArray (const SUPER_t &a)
 
size_t get_DataSize () const
 
HRESULT SerializeOutput (cStreamOutput &file) const
 
HRESULT SerializeInput2 (cStreamInput &file)
 
COMPARE_t Compare (const cVariantArray &aVals) const
 
const cVariantGetArrayElement (ITERATE_t index) const
 
- Public Member Functions inherited from Gray::cArrayStruct< cVariant >
 cArrayStruct () noexcept
 
 cArrayStruct (ITERATE_t iSize)
 
- Public Member Functions inherited from Gray::cArrayTyped< TYPE, ARG_TYPE >
 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, 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)
 
TYPEget_DataWork () const
 
void AddArray (const SUPER_t &src)
 
bool IsEqualArray (const SUPER_t &aValues) const
 
bool isArraySorted () const
 
bool isArraySortedND () const
 
void QSort ()
 
- Public Member Functions inherited from Gray::CArray< TYPE, const 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, const TYPE & newElement)
 
const TYPEGetData () const
 
TYPEGetData ()
 
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)
 
TYPEoperator[] (ITERATE_t nIndex)
 
const TYPEoperator[] (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)
 
- 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, ARG_TYPE >
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 Types inherited from GrayLib::cVariantCommon
typedef INT32 CYS_t
 type for 2 fixed point int for currency/money. More...
 
typedef INT64 CY_t
 type for 4 fixed point int for currency/money. More...
 
- Static Public Member Functions inherited from GrayLib::cVariantCommon
static StrLen_t GRAYCALL CopyLenQ (ATOMCHAR_t *pszDst, const ATOMCHAR_t *pszSrc, StrLen_t iLenMax, STR_BLOCK_TYPE eBlock)
 When converting to string. More...
 
- Static Public Attributes inherited from GrayLib::cVariantCommon
static const ITERATE_t k_MaxElements = 64*1024
 (arbitrary) Max elements that may be parsed in array or map. More...
 
static const ITERATE_t k_MaxElements2 = 256
 arbitrary max for simple things. More...
 
static const CYS_t k_CYSMul = 100
 2 fixed places = cents. CYS_t More...
 
static const CY_t k_CYMul = 10000
 4 fixed places = hundredths of a cent. CY_t More...
 
- Protected Member Functions inherited from Gray::cArrayTyped< TYPE, ARG_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, const TYPE & >
bool IsValidIndex (ITERATE_t i) const noexcept
 
- Protected Attributes inherited from Gray::CArray< TYPE, const TYPE & >
TYPEm_pData
 the actual array of data More...
 
ITERATE_t m_nSize
 Number of elements (upperBound - 1) More...
 

Detailed Description

VARTYPE_Array. Similar to _WIN32 SAFEARRAY

Constructor & Destructor Documentation

◆ cVariantArray() [1/2]

GrayLib::cVariantArray::cVariantArray ( ITERATE_t  iSize = 0)
inline

◆ cVariantArray() [2/2]

GrayLib::cVariantArray::cVariantArray ( const SUPER_t a)
inline

Member Function Documentation

◆ Compare()

COMPARE_t GrayLib::cVariantArray::Compare ( const cVariantArray aVals) const

◆ get_DataSize()

size_t GrayLib::cVariantArray::get_DataSize ( ) const

VARTYPE_Array. Get serialized size in bytes. Not the same as GetHeapStats or GetSize

◆ GetArrayElement()

const cVariant & GrayLib::cVariantArray::GetArrayElement ( ITERATE_t  index) const

◆ SerializeInput2()

HRESULT GrayLib::cVariantArray::SerializeInput2 ( cStreamInput file)

◆ SerializeOutput()

HRESULT GrayLib::cVariantArray::SerializeOutput ( cStreamOutput file) const

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