Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

VDKArray< T > Class Template Reference

provides a templatized array. More...

#include <vdkarray.h>

List of all members.

Public Methods

Private Methods


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 Sat May 4 21:58:36 2002 for vdk 2.0.1 by doxygen1.2.15