Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

SimpleArrayDataT< T > Class Template Reference
[DenseVectorAnalysis]

A class whose primary purpose is to hold an array, keeping track of whether or not to delete this array when an instance of class SimpleArrayDataT goes out of scope. More...

#include <SimpleArrayData.hh>

Inheritance diagram for SimpleArrayDataT< T >:

IotrRefCount List of all members.

Public Methods

 SimpleArrayDataT (T *array, int length)
 Constructor.

 SimpleArrayDataT (int length)
 Constructor.

 ~SimpleArrayDataT ()
 Destructor.

int size () const
 returns size of mArray

T * array ()
 returns pointer mArray

const T & operator[] (int i) const
 Allows for vector[i] notation.


Protected Attributes

int mNeverDelete
 Used to determine whether or not to delete mArray.

int mSize
 Size of mArray.

T * mArray
 Actual array stored.


Detailed Description

template<typename T>
class SimpleArrayDataT< T >

A class whose primary purpose is to hold an array, keeping track of whether or not to delete this array when an instance of class SimpleArrayDataT goes out of scope.

Matrix and vector classes use objects of this class to store the actual matrix or vector.

This is a template class. For your convenience, the type SimpleArrayData has been defined to be SimpleArrayDataT<double>. In other words, SimpleArrayData holds arrays of double precision data.


Constructor & Destructor Documentation

template<typename T>
SimpleArrayDataT< T >::SimpleArrayDataT T *    array,
int    length
[inline]
 

Constructor.

Stores parameter array as a member pointer mArray. Ensures when destructor is called that array is not deleted.

template<typename T>
SimpleArrayDataT< T >::SimpleArrayDataT int    length [inline]
 

Constructor.

Creates a new array. Ensures that elements in mArray are deleted when the object goes out of scope.

template<typename T>
SimpleArrayDataT< T >::~SimpleArrayDataT   [inline]
 

Destructor.

Deletes mArray if necessary.


Member Function Documentation

template<typename T>
const T& SimpleArrayDataT< T >::operator[] int    i const [inline]
 

Allows for vector[i] notation.

Return mElements[i]


The documentation for this class was generated from the following file:
Generated on Wed Aug 27 10:03:42 2003 for iotr by doxygen1.2.18