ReallocableArray< T > Class Template Reference

#include <reallocablearray.h>

Inheritance diagram for ReallocableArray< T >:

Inheritance graph
[legend]
Collaboration diagram for ReallocableArray< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ReallocableArray (int chunk_size=default_chunk_size)
 ReallocableArray (ReallocableArray< T > &other)
virtual ~ReallocableArray ()
void Init (int chunk_size=default_chunk_size)
int NumElements ()
T & operator[] (int index)
void ChunkSize (int new_chunk_size)
T & New ()
void Append (T item)
int Find (T &item)
T & Get (int index)
void DeleteItem (T &item)
void Delete (T &item)
void DeleteAll ()
void DeleteItem (int idx)
ostream & operator<< (ostream &os)
ReallocableArray< T > & operator= (ReallocableArray< T > &r)
ReallocableArray< T > & operator+= (ReallocableArray< T > &r)

Protected Types

enum  { default_chunk_size = 100 }

Protected Attributes

T * ptr
int total_num_elements
int chunk_size
int current_size


Detailed Description

template<class T>
class ReallocableArray< T >

Definition at line 21 of file reallocablearray.h.


Member Enumeration Documentation

template<class T>
anonymous enum [protected]

Enumerator:
default_chunk_size 

Definition at line 27 of file reallocablearray.h.


Constructor & Destructor Documentation

template<class T>
ReallocableArray< T >::ReallocableArray ( int  chunk_size = default_chunk_size  )  [inline]

Definition at line 62 of file reallocablearray.h.

template<class T>
ReallocableArray< T >::ReallocableArray ( ReallocableArray< T > &  other  )  [inline]

Definition at line 69 of file reallocablearray.h.

template<class T>
ReallocableArray< T >::~ReallocableArray (  )  [inline, virtual]

Definition at line 79 of file reallocablearray.h.


Member Function Documentation

template<class T>
void ReallocableArray< T >::Init ( int  chunk_size = default_chunk_size  )  [inline]

Definition at line 54 of file reallocablearray.h.

template<class T>
int ReallocableArray< T >::NumElements (  )  [inline]

Definition at line 34 of file reallocablearray.h.

template<class T>
T& ReallocableArray< T >::operator[] ( int  index  )  [inline]

Definition at line 35 of file reallocablearray.h.

template<class T>
void ReallocableArray< T >::ChunkSize ( int  new_chunk_size  )  [inline]

Definition at line 91 of file reallocablearray.h.

template<class T>
T & ReallocableArray< T >::New (  )  [inline]

Definition at line 96 of file reallocablearray.h.

template<class T>
void ReallocableArray< T >::Append ( item  )  [inline]

Definition at line 191 of file reallocablearray.h.

template<class T>
int ReallocableArray< T >::Find ( T &  item  )  [inline]

Definition at line 118 of file reallocablearray.h.

template<class T>
T & ReallocableArray< T >::Get ( int  index  )  [inline]

Definition at line 125 of file reallocablearray.h.

template<class T>
void ReallocableArray< T >::DeleteItem ( T &  item  )  [inline]

Definition at line 135 of file reallocablearray.h.

template<class T>
void ReallocableArray< T >::Delete ( T &  item  )  [inline]

Definition at line 145 of file reallocablearray.h.

template<class T>
void ReallocableArray< T >::DeleteAll (  )  [inline]

Definition at line 161 of file reallocablearray.h.

template<class T>
void ReallocableArray< T >::DeleteItem ( int  idx  )  [inline]

Definition at line 130 of file reallocablearray.h.

template<class T>
ostream & ReallocableArray< T >::operator<< ( ostream &  os  )  [inline]

Definition at line 168 of file reallocablearray.h.

template<class T>
ReallocableArray< T > & ReallocableArray< T >::operator= ( ReallocableArray< T > &  r  )  [inline]

Definition at line 176 of file reallocablearray.h.

template<class T>
ReallocableArray< T > & ReallocableArray< T >::operator+= ( ReallocableArray< T > &  r  )  [inline]

Definition at line 201 of file reallocablearray.h.


Member Data Documentation

template<class T>
T* ReallocableArray< T >::ptr [protected]

Definition at line 23 of file reallocablearray.h.

template<class T>
int ReallocableArray< T >::total_num_elements [protected]

Definition at line 24 of file reallocablearray.h.

template<class T>
int ReallocableArray< T >::chunk_size [protected]

Definition at line 25 of file reallocablearray.h.

template<class T>
int ReallocableArray< T >::current_size [protected]

Definition at line 26 of file reallocablearray.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 30 11:05:02 2007 for SPRING Mac by  doxygen 1.5.3