TVecTemp.h

Classes

TabVecTemp -- Templated table vectors held in memory as a temporary (full description)

template<class T> class TabVecTemp : public TabVecRep<T>

Interface

Public Members
TabVecTemp (const Vector<T>&)
TabVecTemp (uInt leng)
~TabVecTemp()
inline const T& operator() (uInt index) const
inline T& operator() (uInt index)
T value (uInt index) const
void getVal (uInt index, T&) const
void putVal (uInt index, const T&)
void set (const T&)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Etymology

TabVecTemp is the class dealing with a table vector when used as a temporary in math operations.

Synopsis

TabVecTemp objects enable the use of Vector objects as table vectors. They are used for 2 purposes:
  1. To convert a Vector to a TableVector. This is used to allow the use of Vectors in TableVector expressions. The TabVecTemp object uses the Vector copy constructor, which is very cheap due to its reference semantics.
  2. To hold the result of an operation (like addition) on two TableVector objects.

Motivation

TabVecTemp is derived from TabVecRep and as such a letter for the envelope class TableVector.

Template Type Argument Requirements (T)

To Do

Member Description

TabVecTemp (const Vector<T>&)

Create table vector containing the given Vector (reference semantics). It will set the origin to zero.

TabVecTemp (uInt leng)

Create table vector containing a Vector with given length.

~TabVecTemp()

Destruct the object.

inline const T& operator() (uInt index) const

Return a reference to a value.

inline T& operator() (uInt index)

Return a reference to a value.

T value (uInt index) const

Get a value (virtual function).

void getVal (uInt index, T&) const

Get a value (virtual function).

void putVal (uInt index, const T&)

Put a value (virtual function).

void set (const T&)

Set entire vector to a value.