Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1TableVector.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 21:52:47 2011
Кодировка:

Поисковые слова: guide 8.0
casacore: casa::TableVector< T > Class Template Reference
Public Member Functions

casa::TableVector< T > Class Template Reference
[Tables_module]

Templated read/write table column vectors. More...

#include <TableVector.h>

Inheritance diagram for casa::TableVector< T >:
casa::ROTableVector< T >

List of all members.

Public Member Functions

 TableVector ()
 The default constructor creates a null table vector.
 TableVector (const Table &, const String &)
 Create a table vector from the given table column name.
 TableVector (const TableColumn &)
 Create a table vector from the given table column.
 TableVector (const TableVector< T > &)
 Create a table vector from another one (reference semantics).
 TableVector (const Vector< T > &)
 Create table vector containing given Vector (reference semantics).
 TableVector (uInt leng)
 Create table vector containing a Vector with given length.
 ~TableVector ()
 Destruct the object.
void reference (const TableVector< T > &)
 Make a reference to another TableVector.
TableVector< T > & operator= (const TableVector< T > &)
 Assign a table vector to another one (copy semantics).
TableVector< T > & operator= (const ROTableVector< T > &)
 Assigning to a ROTableVector is impossible, because the vector is readonly.
TableVector< T > & operator= (const T &)
 Set all elements to a value.
void set (const T &value)
void set (uInt index, const T &value)
 Put a value into a single pixel.
TabVecRep< T > & tabVec ()
 Return the TabVecRep reference.
 TableVector (TabVecRep< T > &)
 Create a TableVector from a TabVecRep as result of an operation.

Detailed Description

template<class T>
class casa::TableVector< T >

Templated read/write table column vectors.

Intended use:

Public interface

Review Status

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

Prerequisite

Etymology

TableVector allows to operate on a column in a table as a vector.

Synopsis

TableVector is similar to class ROTableVector . The only difference is that it references a column in a Table object, so it can be written.

Example

       // Create a table vector for column COL1.
       Table tab ("Table.data");
       TableVector<Int> tabvec(tab, "COL1");
       // Multiply it by a constant.
       // The result is stored back in the vector, thus in the
       // underlying column.
       tabvec *= 2;

Motivation

It is very useful to be able to handle a column as a vector. It allows to manipulate the data in a very convenient way.

Template Type Argument Requirements (T)

To Do

Definition at line 270 of file TableVector.h.


Constructor & Destructor Documentation

template<class T>
casa::TableVector< T >::TableVector (  ) 

The default constructor creates a null table vector.

This does not contain an actual vector and cannot be used until it references an actual vector (using function reference). Its purpose is to be able to construct an array of TableVectors. Note that operator(), etc. will cause a segmentation fault when operating on a null object. It was felt it was too expensive to test on null over and over again. The user should use the isNull or throwIfNull function in case of doubt.

template<class T>
casa::TableVector< T >::TableVector ( const Table ,
const String  
)

Create a table vector from the given table column name.

Only scalar columns are supported.

template<class T>
casa::TableVector< T >::TableVector ( const TableColumn  ) 

Create a table vector from the given table column.

Only scalar columns are supported.

template<class T>
casa::TableVector< T >::TableVector ( const TableVector< T > &   ) 

Create a table vector from another one (reference semantics).

template<class T>
casa::TableVector< T >::TableVector ( const Vector< T > &   ) 

Create table vector containing given Vector (reference semantics).

template<class T>
casa::TableVector< T >::TableVector ( uInt  leng  ) 

Create table vector containing a Vector with given length.

template<class T>
casa::TableVector< T >::~TableVector (  ) 

Destruct the object.

template<class T >
casa::TableVector< T >::TableVector ( TabVecRep< T > &  vec  )  [inline]

Create a TableVector from a TabVecRep as result of an operation.

Definition at line 371 of file TableVector.h.

References casa::TabVecRep< T >::link(), and casa::ROTableVector< T >::tabVecPtr_p.


Member Function Documentation

template<class T >
TableVector< T > & casa::TableVector< T >::operator= ( const TableVector< T > &  that  )  [inline]

Assign a table vector to another one (copy semantics).

Definition at line 382 of file TableVector.h.

template<class T >
TableVector< T > & casa::TableVector< T >::operator= ( const T &  value  )  [inline]

Set all elements to a value.

Definition at line 398 of file TableVector.h.

References casa::ROTableVector< T >::tabVecPtr_p.

template<class T >
TableVector< T > & casa::TableVector< T >::operator= ( const ROTableVector< T > &   )  [inline]

Assigning to a ROTableVector is impossible, because the vector is readonly.

Reimplemented from casa::ROTableVector< T >.

Definition at line 376 of file TableVector.h.

References casa::ROTableVector< T >::tabVec(), and casa::ROTableVector< T >::tabVecPtr_p.

template<class T>
void casa::TableVector< T >::reference ( const TableVector< T > &   ) 

Make a reference to another TableVector.

template<class T >
void casa::TableVector< T >::set ( const T &  value  )  [inline]

Definition at line 393 of file TableVector.h.

References casa::ROTableVector< T >::tabVecPtr_p.

template<class T >
void casa::TableVector< T >::set ( uInt  index,
const T &  value 
) [inline]

Put a value into a single pixel.


tabvec(i) = value;

Definition at line 388 of file TableVector.h.

References casa::ROTableVector< T >::tabVecPtr_p.

template<class T >
TabVecRep< T > & casa::TableVector< T >::tabVec (  )  [inline]

Return the TabVecRep reference.

Definition at line 406 of file TableVector.h.

References casa::ROTableVector< T >::tabVecPtr_p.

Referenced by casa::indgen().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines