Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

VDKArray< T > Class Template Reference

provides a templatized array More...

#include <vdkarray.h>

List of all members.

Public Member Functions

Private Member Functions


Detailed Description

template<class T>
class VDKArray< T >

provides a templatized array

OVERVIEW
VDKArray<T> class implements a value semantic, all managed objects are copied from original values. An array can contains type<T> objects, can resize himself to accomodate others objects, however resizing operations must be explicit. A generic type<T> must provide consistent:
Relational operators
A generic type<T> should provide also:
CONSIDERATIONS
Arrays are bounds checked, try to access an element out of bounds will cause an assert()-call failure and abnormal program termination. I recommend to use typedef to consistently declare a type<T> Array:
  typedef Array<someClass>   SomeClassArray;
DEBUGGING
NO_DEBUG directive will avoid any bound checking
REFERENCE
U. Breymann et al. "Composite templates and inheritance" C++ Report, Vol.7, nr. 2, pp. 33-39, 1995


Constructor & Destructor Documentation

template<class T>
VDKArray< T >::VDKArray int  n = 0  )  [inline]
 

Constructor.

Parameters:
n array length

template<class T>
VDKArray< T >::VDKArray const VDKArray< T > &   ) 
 

Copy initializer

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

Destructor


Member Function Documentation

template<class T>
T& VDKArray< T >::At int  ndx  )  [inline, private]
 

/internal

template<class T>
VDKArray< T > & VDKArray< T >::Heapsort  ) 
 

Sorts array on place in n*log(n) time.

Reference
W.H.Press et al. "Numerical recipes in C" 2nd edition Cambridge University Press, 1992

template<class T>
VDKArray< T > & VDKArray< T >::operator= const VDKArray< T > &   ) 
 

Assignement

template<class T>
int VDKArray< T >::operator== VDKArray< T > &  m  )  [virtual]
 

equality operator

template<class T>
T& VDKArray< T >::operator[] int  ndx  )  [inline]
 

Access operator

tip
can be used in both left or rigth side of an expression
    typedef<int> IntArray;
    IntArray integers(10);
    integers[0] = 6;
    int i = integers[0];

template<class T>
void VDKArray< T >::resize int   ) 
 

Resize array

template<class T>
int VDKArray< T >::size  )  [inline]
 

Returns array size


The documentation for this class was generated from the following file:
Generated on Wed Aug 6 11:01:53 2003 for vdk 2.0.3 by doxygen 1.3.2