Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1ROTableMeasColumn.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 22:57:45 2011 Кодировка: Поисковые слова: asteroid |
Read only access to table scalar Measure columns. More...
#include <TableMeasColumn.h>
Public Member Functions | |
ROTableMeasColumn () | |
The default constructor creates a null object. | |
ROTableMeasColumn (const Table &tab, const String &columnName) | |
Create the ScalarMeasColumn from the table and column Name. | |
ROTableMeasColumn (const ROTableMeasColumn &that) | |
Copy constructor (copy semantics). | |
virtual | ~ROTableMeasColumn () |
void | reference (const ROTableMeasColumn &that) |
Change the reference to another column. | |
void | attach (const Table &tab, const String &columnName) |
Attach another column to the object. | |
Bool | isDefined (uInt rownr) const |
Tests if a row contains a Measure (i.e., if the row has a defined value). | |
const TableMeasDescBase & | measDesc () const |
Get access to the TableMeasDescBase describing the column. | |
TableMeasDescBase & | measDesc () |
Bool | isNull () const |
Test if the object is null. | |
void | throwIfNull () const |
Throw an exception if the object is null. | |
const String & | columnName () const |
Get the name of the column. | |
Table | table () const |
Get the Table object this column belongs to. | |
Bool | isScalar () const |
Is the column a scalar measures column? It is if the underlying column is a scalar column or an array column with a fixed 1-dimensional shape. | |
Protected Attributes | |
uInt | itsNvals |
CountedPtr< TableMeasDescBase > | itsDescPtr |
ROTableColumn | itsTabDataCol |
Bool | itsVarRefFlag |
Bool | itsVarOffFlag |
Private Member Functions | |
ROTableMeasColumn & | operator= (const ROTableMeasColumn &that) |
Assignment makes no sense in a readonly class. |
Read only access to table scalar Measure columns.
Public interface
ROTableMeasColumn is the base class for the templated classes ROScalarMeasColumn and ROArrayMeasColumn which give access to table columns containing measures .
This base class offers some common functionality like getting the column name and testing if a row of the column contains a value. Its main function is measDesc()
, which gives access to the TableMeasDescBase object containing a description of the measure column.
// Create the object for measure column Time1. ROTableMeasColumn timeCol(tab, "Time1"); // print some details about the column if (timeCol.measDesc().isRefCodeVariable()) { cout << "The column has variable references." << endl; } else { cout << "The fixed MeasRef for the column is: " << timeCol.getMeasRef() << endl; }
This class contains the common functionality for the templated derived classes.
Definition at line 97 of file TableMeasColumn.h.
casa::ROTableMeasColumn::ROTableMeasColumn | ( | ) |
The default constructor creates a null object.
Useful for creating arrays of ROScalarMeasColumn objects. Attempting to use a null object will produce a segmentation fault so care needs to be taken to initialise the objects first by using attach(). An ROScalarMeasColumn object can be tested if it is null by using the isNull() member.
Create the ScalarMeasColumn from the table and column Name.
casa::ROTableMeasColumn::ROTableMeasColumn | ( | const ROTableMeasColumn & | that | ) |
Copy constructor (copy semantics).
virtual casa::ROTableMeasColumn::~ROTableMeasColumn | ( | ) | [virtual] |
Attach another column to the object.
Reimplemented in casa::ROArrayMeasColumn< M >, casa::ArrayMeasColumn< M >, casa::ROScalarMeasColumn< M >, casa::ScalarMeasColumn< M >, casa::ROArrayMeasColumn< MRadialVelocity >, casa::ROArrayMeasColumn< MDirection >, casa::ROArrayMeasColumn< MFrequency >, casa::ROArrayMeasColumn< MEpoch >, casa::ArrayMeasColumn< MRadialVelocity >, casa::ArrayMeasColumn< MDirection >, casa::ArrayMeasColumn< MFrequency >, casa::ArrayMeasColumn< MEpoch >, casa::ROScalarMeasColumn< MRadialVelocity >, casa::ROScalarMeasColumn< MPosition >, casa::ROScalarMeasColumn< MDirection >, casa::ROScalarMeasColumn< MFrequency >, casa::ROScalarMeasColumn< Muvw >, casa::ROScalarMeasColumn< MDoppler >, casa::ROScalarMeasColumn< MEpoch >, casa::ScalarMeasColumn< MRadialVelocity >, casa::ScalarMeasColumn< MPosition >, casa::ScalarMeasColumn< MDirection >, casa::ScalarMeasColumn< MFrequency >, casa::ScalarMeasColumn< Muvw >, casa::ScalarMeasColumn< MDoppler >, and casa::ScalarMeasColumn< MEpoch >.
const String& casa::ROTableMeasColumn::columnName | ( | ) | const |
Get the name of the column.
Tests if a row contains a Measure (i.e., if the row has a defined value).
Bool casa::ROTableMeasColumn::isNull | ( | ) | const [inline] |
Test if the object is null.
Definition at line 135 of file TableMeasColumn.h.
References itsDescPtr, and casa::SimpleCountedConstPtr< t >::null().
Bool casa::ROTableMeasColumn::isScalar | ( | ) | const |
Is the column a scalar measures column? It is if the underlying column is a scalar column or an array column with a fixed 1-dimensional shape.
Otherwise it is an array measures column.
Caution: It is not 100% determined if a measure column is an array or a scalar; If the underlying table column is an array with a variable shape, this function will see it as an array measure column; However, it might be accessible as a scalar measure column;
const TableMeasDescBase& casa::ROTableMeasColumn::measDesc | ( | ) | const [inline] |
Get access to the TableMeasDescBase describing the column.
Definition at line 128 of file TableMeasColumn.h.
References itsDescPtr.
TableMeasDescBase& casa::ROTableMeasColumn::measDesc | ( | ) | [inline] |
Definition at line 130 of file TableMeasColumn.h.
References itsDescPtr.
ROTableMeasColumn& casa::ROTableMeasColumn::operator= | ( | const ROTableMeasColumn & | that | ) | [private] |
Ass