CCArray< TYPE, ARG_TYPE > Class Template Reference

#include <ccarray.h>

List of all members.

Public Types

typedef std::vector< TYPE > CArrayClass
typedef CArrayClass::iterator iterator

Public Member Functions

BOOL SetSize (INT32 nNewSize, INT32 nGrowBy=-1)
BOOL SetAtGrow (INT32 nIndex, ARG_TYPE newElement)
size_t Add (ARG_TYPE newElement)
TYPE & operator[] (INT32 nIndex)
const TYPE & operator[] (INT32 nIndex) const

Protected Attributes

CArrayClass m_Array


Detailed Description

template<typename TYPE, typename ARG_TYPE>
class CCArray< TYPE, ARG_TYPE >

Author:
Date:

Definition at line 114 of file ccarray.h.


Member Typedef Documentation

template<typename TYPE, typename ARG_TYPE>
typedef std::vector< TYPE > CCArray< TYPE, ARG_TYPE >::CArrayClass
 

Definition at line 117 of file ccarray.h.

template<typename TYPE, typename ARG_TYPE>
typedef CArrayClass::iterator CCArray< TYPE, ARG_TYPE >::iterator
 

Definition at line 118 of file ccarray.h.


Member Function Documentation

template<class TYPE, class ARG_TYPE>
size_t CCArray< TYPE, ARG_TYPE >::Add ARG_TYPE  newElement  )  [inline]
 

Definition at line 169 of file ccarray.h.

00170 {
00171     m_Array.push_back( newElement );
00172     return m_Array.size();
00173 }

template<class TYPE, class ARG_TYPE>
const TYPE & CCArray< TYPE, ARG_TYPE >::operator[] INT32  nIndex  )  const [inline]
 

Definition at line 182 of file ccarray.h.

00183 {
00184     return *( m_Array.begin() + nIndex );
00185 }

template<class TYPE, class ARG_TYPE>
TYPE & CCArray< TYPE, ARG_TYPE >::operator[] INT32  nIndex  )  [inline]
 

Definition at line 176 of file ccarray.h.

00177 {
00178     return *( m_Array.begin() + nIndex );
00179 }

template<class TYPE, class ARG_TYPE>
BOOL CCArray< TYPE, ARG_TYPE >::SetAtGrow INT32  nIndex,
ARG_TYPE  newElement
 

Definition at line 152 of file ccarray.h.

00153 {
00154 //  TRY
00155     {
00156         m_Array.insert( m_Array.begin() + nIndex, newElement );
00157     }
00158 /*  CATCH_ALL(e)
00159     {
00160         return FALSE;
00161     }
00162     END_CATCH_ALL */
00163 
00164     return TRUE;
00165 }

template<class TYPE, class ARG_TYPE>
BOOL CCArray< TYPE, ARG_TYPE >::SetSize INT32  nNewSize,
INT32  nGrowBy = -1
 

Definition at line 134 of file ccarray.h.

00135 {
00136 //  TRY
00137     {
00138         nNewSize = ( ( nNewSize + ( nGrowBy - 1 ) ) / nGrowBy ) * nGrowBy;
00139         m_Array.resize( nNewSize );
00140     }
00141 /*  CATCH_ALL(e)
00142     {
00143         return FALSE;
00144     }
00145     END_CATCH_ALL */
00146 
00147     return TRUE;
00148 }


Member Data Documentation

template<typename TYPE, typename ARG_TYPE>
CArrayClass CCArray< TYPE, ARG_TYPE >::m_Array [protected]
 

Definition at line 121 of file ccarray.h.


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 03:52:02 2007 for Camelot by  doxygen 1.4.4