Loading...
Searching...
No Matches
casacore::TabVecTemp< T > Class Template Reference
tables package (libcasa_tables) » Tables_module » Tables_module_internal_classes

More...

`#include <TVecTemp.h>`

## Public Member Functions

| TabVecTemp (const Vector< T > &)
| Create table vector containing the given Vector (reference semantics).
| TabVecTemp (rownr_t leng)
| Create table vector containing a Vector with given length.
| ~TabVecTemp ()
| Destruct the object.
const T & | operator() (rownr_t index) const
| Return a reference to a value.
T & | operator() (rownr_t index)
| Return a reference to a value.
T | value (rownr_t index) const
| Get a value (virtual function).
void | getVal (rownr_t index, T &) const
| Get a value (virtual function).
void | putVal (rownr_t index, const T &)
| Put a value (virtual function).
void | set (const T &)
| Set entire vector to a value.
Public Member Functions inherited from casacore::TabVecRep< T >
| TabVecRep ()
| Create empty table vector.
virtual | ~TabVecRep ()
| Destruct the object.
uInt | ndim () const
| Get nr of dimensions.
rownr_t | nelements () const
| Get nr of elements (ie.
Bool | conform (const TabVecRep< T > &) const
| Test if vector shape conforms another table vector.
Bool | conform (const Vector< T > &) const
| Test if vector shape conforms another vector.
Bool | ok () const
| Check internal consistency.
TabVecRep< T > * | link ()
| Increments the reference count.
uInt | unlink ()
| Decrements the reference count and returns the resulting count.
TabVecTag | getTag () const
| Get the tag (the type of vector).
virtual void | assign (const TabVecRep< T > &)
| Set to another table vector.
void | validateConformance (rownr_t) const
| Check if vectors are comformant.
void * | newVec () const
| Create a new temporary vector (for result of math operations).

## Protected Attributes

Vector< T > * | vecPtr_p
Protected Attributes inherited from casacore::TabVecRep< T >
uInt | count_p
TabVecTag | tag_p
Int64 | nrel_p

## Additional Inherited Members

Protected Member Functions inherited from casacore::TabVecRep< T >
virtual rownr_t | nelem () const
| Get nr of elements.

## Detailed Description

template<class T>
class casacore::TabVecTemp< T >

Templated table vectors held in memory as a temporary

### Intended use:

Internal

### Review Status

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

### Prerequisite

- TabVecRep

### 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)

- Default constructor
- Copy constructor
- Assignment operator

### To Do

- In the future temporary results may need to use a file, because table vectors can potentially be very, very long.

Definition at line 86 of file TVecTemp.h.

## Constructor & Destructor Documentation

## TabVecTemp() [1/2]

template<class T>

casacore::TabVecTemp< T >::TabVecTemp | ( | const Vector< T > & |  | ) |

Create table vector containing the given Vector (reference semantics).

It will set the origin to zero.

## TabVecTemp() [2/2]

template<class T>

casacore::TabVecTemp< T >::TabVecTemp | ( | rownr_t | leng | ) |

Create table vector containing a Vector with given length.

## ~TabVecTemp()

template<class T>

casacore::TabVecTemp< T >::~TabVecTemp | ( |  | ) |

Destruct the object.

## Member Function Documentation

## getVal()

template<class T>

void casacore::TabVecTemp< T >::getVal | ( | rownr_t | index,
|  | T & | ) const

virtual

Get a value (virtual function).

Implements casacore::TabVecRep< T >.

## operator()() [1/2]

template<class T>

T & casacore::TabVecTemp< T >::operator() | ( | rownr_t | index | ) |

inline

Return a reference to a value.

Definition at line 132 of file TVecTemp.h.

References vecPtr_p.

## operator()() [2/2]

template<class T>

const T & casacore::TabVecTemp< T >::operator() | ( | rownr_t | index | ) | const

inline

Return a reference to a value.

Definition at line 129 of file TVecTemp.h.

References vecPtr_p.

## putVal()

template<class T>

void casacore::TabVecTemp< T >::putVal | ( | rownr_t | index,
|  | const T & | )

virtual

Put a value (virtual function).

Implements casacore::TabVecRep< T >.

## set()

template<class T>

void casacore::TabVecTemp< T >::set | ( | const T & |  | ) |

virtual

Set entire vector to a value.

Implements casacore::TabVecRep< T >.

## value()

template<class T>

T casacore::TabVecTemp< T >::value | ( | rownr_t | index | ) | const

virtual

Get a value (virtual function).

Implements casacore::TabVecRep< T >.

## Member Data Documentation

## vecPtr_p

template<class T>

Vector<T>* casacore::TabVecTemp< T >::vecPtr_p

protected

Definition at line 122 of file TVecTemp.h.

Referenced by operator()(), and operator()().

The documentation for this class was generated from the following file:

- tables/Tables/TVecTemp.h