#include <xparray.h>

Public Member Functions

 CXpArray (const INT_PTR nGrowBy=10)
 
 CXpArray (const CXpArray &Array)
 
virtual ~CXpArray ()
 
HRESULT Add (const TYPE &Element, INT_PTR *pNewIndex=NULL)
 
HRESULT Insert (const INT_PTR nIndex, const TYPE &Element)
 
HRESULT Remove (const INT_PTR nIndex, const INT_PTR nCount=1)
 
void RemoveAll ()
 
INT_PTR GetCount () const
 
HRESULT SetCount (const INT_PTR nNewCount)
 
INT_PTR GetGrowBy () const
 
void SetGrowBy (const INT_PTR nGrowBy)
 
HRESULT PreAlloc (const INT_PTR nCount)
 
HRESULT FreeExtra ()
 
HRESULT Append (const CXpArray &Array)
 
HRESULT Mid (CXpArray &Subset, const INT_PTR nFrom, const INT_PTR nCount=-1) const
 
HRESULT Left (CXpArray &Subset, const INT_PTR nCount) const
 
HRESULT Right (CXpArray &Subset, const INT_PTR nCount) const
 
INT_PTR Find (const TYPE &Element, const INT_PTR nStart=0) const
 
INT_PTR Find (const CXpArray &Subset, const INT_PTR nStart=0) const
 
TYPE * GetData ()
 
const TYPE * GetData () const
 
TYPE & operator[] (const INT_PTR nIndex)
 
const TYPE & operator[] (const INT_PTR nIndex) const
 
bool operator== (const CXpArray &Array) const
 
bool operator!= (const CXpArray &Array) const
 
HRESULT Copy (const CXpArray &Array)
 
CXpArrayoperator= (const CXpArray &Array)
 

Static Public Member Functions

static void SetMoveCallback (void(*pfnMoveCallback)(TYPE *pObject, const INT_PTR nCount))
 

Protected Types

typedef void(* PFN_MoveCallback) (TYPE *pObject, const INT_PTR nCount)
 

Protected Member Functions

HRESULT Allocate (const INT_PTR nCount, const bool bInitialize=true)
 
void ConstructElement (const INT_PTR nIndex, const INT_PTR nCount=1)
 
void DestructElement (const INT_PTR nIndex, const INT_PTR nCount=1)
 

Protected Attributes

TYPE * m_pData
 
INT_PTR m_nElementCount
 
INT_PTR m_nAllocedCount
 
INT_PTR m_nGrowBy
 

Static Protected Attributes

static void * m_pfnMoveCallback
 

Member Typedef Documentation

◆ PFN_MoveCallback

template<typename TYPE>
typedef void(* CXpArray< TYPE >::PFN_MoveCallback) (TYPE *pObject, const INT_PTR nCount)
protected

Constructor & Destructor Documentation

◆ CXpArray() [1/2]

template<typename TYPE>
CXpArray< TYPE >::CXpArray ( const INT_PTR  nGrowBy = 10)
inline

◆ CXpArray() [2/2]

template<typename TYPE>
CXpArray< TYPE >::CXpArray ( const CXpArray< TYPE > &  Array)
inline

◆ ~CXpArray()

template<typename TYPE>
virtual CXpArray< TYPE >::~CXpArray ( )
virtual

Member Function Documentation

◆ Add()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Add ( const TYPE &  Element,
INT_PTR *  pNewIndex = NULL 
)
inline

◆ Allocate()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Allocate ( const INT_PTR  nCount,
const bool  bInitialize = true 
)
protected

◆ Append()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Append ( const CXpArray< TYPE > &  Array)
inline

◆ ConstructElement()

template<typename TYPE>
void CXpArray< TYPE >::ConstructElement ( const INT_PTR  nIndex,
const INT_PTR  nCount = 1 
)
inlineprotected

◆ Copy()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Copy ( const CXpArray< TYPE > &  Array)
inline

◆ DestructElement()

template<typename TYPE>
void CXpArray< TYPE >::DestructElement ( const INT_PTR  nIndex,
const INT_PTR  nCount = 1 
)
inlineprotected

◆ Find() [1/2]

template<typename TYPE>
INT_PTR CXpArray< TYPE >::Find ( const TYPE &  Element,
const INT_PTR  nStart = 0 
) const

◆ Find() [2/2]

template<typename TYPE>
INT_PTR CXpArray< TYPE >::Find ( const CXpArray< TYPE > &  Subset,
const INT_PTR  nStart = 0 
) const

◆ FreeExtra()

template<typename TYPE>
HRESULT CXpArray< TYPE >::FreeExtra ( )
inline

◆ GetCount()

template<typename TYPE>
INT_PTR CXpArray< TYPE >::GetCount ( ) const
inline

◆ GetData() [1/2]

template<typename TYPE>
TYPE* CXpArray< TYPE >::GetData ( )

◆ GetData() [2/2]

template<typename TYPE>
const TYPE* CXpArray< TYPE >::GetData ( ) const

◆ GetGrowBy()

template<typename TYPE>
INT_PTR CXpArray< TYPE >::GetGrowBy ( ) const
inline

◆ Insert()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Insert ( const INT_PTR  nIndex,
const TYPE &  Element 
)
inline

◆ Left()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Left ( CXpArray< TYPE > &  Subset,
const INT_PTR  nCount 
) const

◆ Mid()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Mid ( CXpArray< TYPE > &  Subset,
const INT_PTR  nFrom,
const INT_PTR  nCount = -1 
) const

◆ operator!=()

template<typename TYPE>
bool CXpArray< TYPE >::operator!= ( const CXpArray< TYPE > &  Array) const
inline

◆ operator=()

template<typename TYPE>
CXpArray& CXpArray< TYPE >::operator= ( const CXpArray< TYPE > &  Array)
inline

◆ operator==()

template<typename TYPE>
bool CXpArray< TYPE >::operator== ( const CXpArray< TYPE > &  Array) const
inline

◆ operator[]() [1/2]

template<typename TYPE>
TYPE& CXpArray< TYPE >::operator[] ( const INT_PTR  nIndex)
inline

◆ operator[]() [2/2]

template<typename TYPE>
const TYPE& CXpArray< TYPE >::operator[] ( const INT_PTR  nIndex) const
inline

◆ PreAlloc()

template<typename TYPE>
HRESULT CXpArray< TYPE >::PreAlloc ( const INT_PTR  nCount)
inline

◆ Remove()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Remove ( const INT_PTR  nIndex,
const INT_PTR  nCount = 1 
)
inline

◆ RemoveAll()

template<typename TYPE>
void CXpArray< TYPE >::RemoveAll ( )
inline

◆ Right()

template<typename TYPE>
HRESULT CXpArray< TYPE >::Right ( CXpArray< TYPE > &  Subset,
const INT_PTR  nCount 
) const

◆ SetCount()

template<typename TYPE>
HRESULT CXpArray< TYPE >::SetCount ( const INT_PTR  nNewCount)
inline

◆ SetGrowBy()

template<typename TYPE>
void CXpArray< TYPE >::SetGrowBy ( const INT_PTR  nGrowBy)
inline

◆ SetMoveCallback()

template<typename TYPE>
static void CXpArray< TYPE >::SetMoveCallback ( void(*)(TYPE *pObject, const INT_PTR nCount)  pfnMoveCallback)
static

Member Data Documentation

◆ m_nAllocedCount

template<typename TYPE>
INT_PTR CXpArray< TYPE >::m_nAllocedCount
protected

◆ m_nElementCount

template<typename TYPE>
INT_PTR CXpArray< TYPE >::m_nElementCount
protected

◆ m_nGrowBy

template<typename TYPE>
INT_PTR CXpArray< TYPE >::m_nGrowBy
protected

◆ m_pData

template<typename TYPE>
TYPE* CXpArray< TYPE >::m_pData
protected

◆ m_pfnMoveCallback

template<typename TYPE>
void* CXpArray< TYPE >::m_pfnMoveCallback
staticprotected