CDynArray< ArrayElement > Class Template Reference

#include <private_ge_mtools.h>

Public Member Functions

 CDynArray ()
 
 CDynArray (ArrayElement *pDefaultElement)
 
virtual ~CDynArray ()
 
Bool Alloc (Int32 lExtraElements, Int32 lNewElementCount=-1, Bool bClear=true)
 
Bool SetMinSize (Int32 lElements)
 
Bool SetMinSizeNoCopy (Int32 lElements, Bool bClear=true)
 
Bool Init (const ArrayElement *pArray, Int32 lCount)
 
Bool Init (const CDynArray< ArrayElement > &ar)
 
Bool InitNoCopy (ArrayElement *pArray, Int32 lCount)
 
ArrayElement * GetNext (Int32 lNewElementCount=-1, Bool bClear=true)
 
ArrayElement * InsertAtA (Int32 l=0, Int32 lNewElementCount=-1)
 
ArrayElement * InsertMoreAt (Int32 l=0, Int32 lInsert=1, Int32 lNewElementCount=-1)
 
ArrayElement * InsertMoreAt (Int32 lPos, Int32 lCount, const ArrayElement *pElements)
 
ArrayElement * GetElement (Int32 lIndex) const
 
const ArrayElement * GetArray () const
 
ArrayElement * GetArray ()
 
Bool Append (const ArrayElement &e, Int32 lGetNextAdd=20, Bool bClear=true)
 
Bool Append (const ArrayElement *e, Int32 lElements)
 
Bool InsertAtB (const ArrayElement &e, Int32 l, Int32 lNewElementCount=-1)
 
Int32 GetElementCount () const
 
Bool IsEmpty () const
 
Int32 GetMaxElementCount () const
 
void ResetCounter (Bool bErase=false)
 
void SetCounter (Int32 l)
 
Bool RemoveAt (Int32 l, Bool bFillZeros)
 
Bool RemoveAt (Int32 lPos, Int32 lCount, Bool bFillZeros)
 
void SetData (void *pData)
 
void * GetData () const
 
virtual void Free ()
 
virtual void ExchangeContents (CDynArray< ArrayElement > *pDest)
 
void Release ()
 
ArrayElement & operator[] (Int32 l) const
 
Bool CopyTo (CDynArray< ArrayElement > *pDest) const
 
void Flip ()
 
Bool IsEqual (const CDynArray< ArrayElement > *pCmp) const
 
Bool Read (HyperFile *pFile, Bool bFlush=true)
 
Bool Write (HyperFile *pFile, Int32 lLevel) const
 
virtual Bool ReadElements (HyperFile *pFile, ArrayElement *pElement, Int32 lCount, Int32 lLevel)
 
virtual Bool WriteElements (HyperFile *pFile, const ArrayElement *pElement, Int32 lCount) const
 

Public Attributes

ArrayElement * m_pElements
 
Int32 m_lElements
 
Int32 m_lMaxElements
 
ArrayElement * m_pDefaultElement
 
void * m_pData
 

Constructor & Destructor Documentation

◆ CDynArray() [1/2]

◆ CDynArray() [2/2]

CDynArray ( ArrayElement *  pDefaultElement)

◆ ~CDynArray()

~CDynArray
virtual

Member Function Documentation

◆ Alloc()

Bool Alloc ( Int32  lExtraElements,
Int32  lNewElementCount = -1,
Bool  bClear = true 
)

◆ SetMinSize()

Bool SetMinSize ( Int32  lElements)

◆ SetMinSizeNoCopy()

Bool SetMinSizeNoCopy ( Int32  lElements,
Bool  bClear = true 
)

◆ Init() [1/2]

Bool Init ( const ArrayElement *  pArray,
Int32  lCount 
)

◆ Init() [2/2]

Bool Init ( const CDynArray< ArrayElement > &  ar)

◆ InitNoCopy()

Bool InitNoCopy ( ArrayElement *  pArray,
Int32  lCount 
)

◆ GetNext()

ArrayElement * GetNext ( Int32  lNewElementCount = -1,
Bool  bClear = true 
)

◆ InsertAtA()

ArrayElement * InsertAtA ( Int32  l = 0,
Int32  lNewElementCount = -1 
)

◆ InsertMoreAt() [1/2]

ArrayElement * InsertMoreAt ( Int32  l = 0,
Int32  lInsert = 1,
Int32  lNewElementCount = -1 
)

◆ InsertMoreAt() [2/2]

ArrayElement * InsertMoreAt ( Int32  lPos,
Int32  lCount,
const ArrayElement *  pElements 
)

◆ GetElement()

ArrayElement * GetElement ( Int32  lIndex) const

◆ GetArray() [1/2]

const ArrayElement* GetArray ( ) const

◆ GetArray() [2/2]

ArrayElement* GetArray ( )

◆ Append() [1/2]

Bool Append ( const ArrayElement &  e,
Int32  lGetNextAdd = 20,
Bool  bClear = true 
)

◆ Append() [2/2]

Bool Append ( const ArrayElement *  e,
Int32  lElements 
)

◆ InsertAtB()

Bool InsertAtB ( const ArrayElement &  e,
Int32  l,
Int32  lNewElementCount = -1 
)

◆ GetElementCount()

Int32 GetElementCount ( ) const

◆ IsEmpty()

Bool IsEmpty ( ) const

◆ GetMaxElementCount()

Int32 GetMaxElementCount ( ) const

◆ ResetCounter()

void ResetCounter ( Bool  bErase = false)

◆ SetCounter()

void SetCounter ( Int32  l)

◆ RemoveAt() [1/2]

Bool RemoveAt ( Int32  l,
Bool  bFillZeros 
)

◆ RemoveAt() [2/2]

Bool RemoveAt ( Int32  lPos,
Int32  lCount,
Bool  bFillZeros 
)

◆ SetData()

void SetData ( void *  pData)

◆ GetData()

void* GetData ( ) const

◆ Free()

void Free
virtual

◆ ExchangeContents()

void ExchangeContents ( CDynArray< ArrayElement > *  pDest)
virtual

◆ Release()

void Release

◆ operator[]()

ArrayElement & operator[] ( Int32  l) const

◆ CopyTo()

Bool CopyTo ( CDynArray< ArrayElement > *  pDest) const

◆ Flip()

void Flip

◆ IsEqual()

Bool IsEqual ( const CDynArray< ArrayElement > *  pCmp) const

◆ Read()

Bool Read ( HyperFile pFile,
Bool  bFlush = true 
)

◆ Write()

Bool Write ( HyperFile pFile,
Int32  lLevel 
) const

◆ ReadElements()

Bool ReadElements ( HyperFile pFile,
ArrayElement *  pElement,
Int32  lCount,
Int32  lLevel 
)
virtual

◆ WriteElements()

Bool WriteElements ( HyperFile pFile,
const ArrayElement *  pElement,
Int32  lCount 
) const
virtual

Member Data Documentation

◆ m_pElements

ArrayElement* m_pElements

◆ m_lElements

Int32 m_lElements

◆ m_lMaxElements

Int32 m_lMaxElements

◆ m_pDefaultElement

ArrayElement* m_pDefaultElement

◆ m_pData

void* m_pData