casacore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::ImageAttrGroupCasa Class Reference

More...

#include <ImageAttrGroupCasa.h>

Public Member Functions

 ImageAttrGroupCasa ()
 The default constructor creates a null object. More...
 
 ImageAttrGroupCasa (const Table &image, const String &attrGroupName)
 Construct the object for an attribute group in the image table. More...
 
virtual ~ImageAttrGroupCasa ()
 
Bool isNull () const
 Test if it is a null object. More...
 
void flush ()
 Flush the attibrutes if needed. More...
 
virtual uInt nrows () const
 Get the number of rows in the group. More...
 
virtual Bool hasAttr (const String &attrName) const
 Test if an attribute exists. More...
 
virtual Vector< StringattrNames () const
 Get all attribute names. More...
 
virtual DataType dataType (const String &attrName) const
 Get the datatype of a attribute. More...
 
virtual ValueHolder getData (const String &attrName, uInt rownr)
 Get the data of the given attribute. More...
 
virtual Record getDataRow (uInt rownr)
 Get the data of all attributes in a rows. More...
 
virtual Vector< StringgetUnit (const String &attrName)
 Get the possible units of the values. More...
 
virtual Vector< StringgetMeasInfo (const String &attrName)
 Get the possible measure info as type and Ref. More...
 
virtual void putData (const String &attrName, uInt rownr, const ValueHolder &data, const Vector< String > &units=Vector< String >(), const Vector< String > &measInfo=Vector< String >())
 Put the data of the given attribute. More...
 
- Public Member Functions inherited from casacore::ImageAttrGroup
 ImageAttrGroup ()
 Default constructor. More...
 
virtual ~ImageAttrGroup ()
 

Private Member Functions

void checkRows (const String &attrName, uInt size)
 Check if the size matches the number of rows. More...
 
Bool addNewColumn (const String &attrName, const ValueHolder &)
 Add a new column for the given attribute for the data type in the value. More...
 

Private Attributes

TableProxy itsTable
 

Detailed Description

Attribute group for a CASA image.

Intended use:

Public interface

Review Status

Test programs:
tPagedmage
Demo programs:
dPagedImage

Prerequisite

Synopsis

This is the implementation of base class class ImageAttrGroup for an image stored in the casacore table format. See the base class for more information.

Definition at line 57 of file ImageAttrGroupCasa.h.

Constructor & Destructor Documentation

◆ ImageAttrGroupCasa() [1/2]

casacore::ImageAttrGroupCasa::ImageAttrGroupCasa ( )
inline

The default constructor creates a null object.

Definition at line 61 of file ImageAttrGroupCasa.h.

◆ ImageAttrGroupCasa() [2/2]

casacore::ImageAttrGroupCasa::ImageAttrGroupCasa ( const Table image,
const String attrGroupName 
)

Construct the object for an attribute group in the image table.

Note that the group name is the name of a subtable containing the info.

◆ ~ImageAttrGroupCasa()

virtual casacore::ImageAttrGroupCasa::~ImageAttrGroupCasa ( )
virtual

Member Function Documentation

◆ addNewColumn()

Bool casacore::ImageAttrGroupCasa::addNewColumn ( const String attrName,
const ValueHolder  
)
private

Add a new column for the given attribute for the data type in the value.

◆ attrNames()

virtual Vector<String> casacore::ImageAttrGroupCasa::attrNames ( ) const
virtual

Get all attribute names.

Implements casacore::ImageAttrGroup.

◆ checkRows()

void casacore::ImageAttrGroupCasa::checkRows ( const String attrName,
uInt  size 
)
private

Check if the size matches the number of rows.

Add rows if the table is still empty.

◆ dataType()

virtual DataType casacore::ImageAttrGroupCasa::dataType ( const String attrName) const
virtual

Get the datatype of a attribute.

It returns TpOther if the attribute is not defined.

Implements casacore::ImageAttrGroup.

◆ flush()

void casacore::ImageAttrGroupCasa::flush ( )

Flush the attibrutes if needed.

◆ getData()

virtual ValueHolder casacore::ImageAttrGroupCasa::getData ( const String attrName,
uInt  rownr 
)
virtual

Get the data of the given attribute.

Implements casacore::ImageAttrGroup.

◆ getDataRow()

virtual Record casacore::ImageAttrGroupCasa::getDataRow ( uInt  rownr)
virtual

Get the data of all attributes in a rows.

Implements casacore::ImageAttrGroup.

◆ getMeasInfo()

virtual Vector<String> casacore::ImageAttrGroupCasa::getMeasInfo ( const String attrName)
virtual

Get the possible measure info as type and Ref.

An empty vector is returned if the attribute has no MEASINFO.

Implements casacore::ImageAttrGroup.

◆ getUnit()

virtual Vector<String> casacore::ImageAttrGroupCasa::getUnit ( const String attrName)
virtual

Get the possible units of the values.

An empty vector is returned if the attribute has no units.

Implements casacore::ImageAttrGroup.

◆ hasAttr()

virtual Bool casacore::ImageAttrGroupCasa::hasAttr ( const String attrName) const
virtual

Test if an attribute exists.

Implements casacore::ImageAttrGroup.

◆ isNull()

Bool casacore::ImageAttrGroupCasa::isNull ( ) const
inline

Test if it is a null object.

Definition at line 71 of file ImageAttrGroupCasa.h.

References casacore::Table::isNull(), itsTable, and casacore::TableProxy::table().

◆ nrows()

virtual uInt casacore::ImageAttrGroupCasa::nrows ( ) const
virtual

Get the number of rows in the group.

Implements casacore::ImageAttrGroup.

◆ putData()

virtual void casacore::ImageAttrGroupCasa::putData ( const String attrName,
uInt  rownr,
const ValueHolder data,
const Vector< String > &  units = VectorString >(),
const Vector< String > &  measInfo = VectorString >() 
)
virtual

Put the data of the given attribute.

If the table does not contain data yet, it will be sized to the size of the vector. Otherwise the vector size has to match the table size.
If not empty, the units and MEASINFO will be put as column keywords. The MEASINFO vector must be given as type,Ref.

Implements casacore::ImageAttrGroup.

Member Data Documentation

◆ itsTable

TableProxy casacore::ImageAttrGroupCasa::itsTable
private

Definition at line 123 of file ImageAttrGroupCasa.h.

Referenced by isNull().


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