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

More...

#include <ImageAttrGroupHDF5.h>

Public Member Functions

 ImageAttrGroupHDF5 (Bool isWritable=False)
 The default constructor creates a null object. More...
 
 ImageAttrGroupHDF5 (const HDF5Group &image, const String &attrGroupName, Bool writable)
 Construct the object for an attribute group in the image. More...
 
virtual ~ImageAttrGroupHDF5 ()
 
Bool isNull () const
 Test if it is a null object. More...
 
void flush (HDF5Group &image, const String &attrGroupName)
 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 in the given row. 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 (stored as attrName_UNIT). More...
 
virtual Vector< StringgetMeasInfo (const String &attrName)
 Get the possible measure info as type,Ref (stored as attrName_MEASINFO). 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 rownr)
 Check the rownr and add a row if needed. More...
 

Private Attributes

Record itsRecord
 
Bool itsChanged
 
Bool itsCanWrite
 

Detailed Description

Attribute group for a HDF5 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 HDF5 format. See the base class for more information.

Definition at line 58 of file ImageAttrGroupHDF5.h.

Constructor & Destructor Documentation

◆ ImageAttrGroupHDF5() [1/2]

casacore::ImageAttrGroupHDF5::ImageAttrGroupHDF5 ( Bool  isWritable = False)
inlineexplicit

The default constructor creates a null object.

Definition at line 62 of file ImageAttrGroupHDF5.h.

◆ ImageAttrGroupHDF5() [2/2]

casacore::ImageAttrGroupHDF5::ImageAttrGroupHDF5 ( const HDF5Group image,
const String attrGroupName,
Bool  writable 
)

Construct the object for an attribute group in the image.

If present, it reads all attributes.

◆ ~ImageAttrGroupHDF5()

virtual casacore::ImageAttrGroupHDF5::~ImageAttrGroupHDF5 ( )
virtual

Member Function Documentation

◆ attrNames()

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

Get all attribute names.

Implements casacore::ImageAttrGroup.

◆ checkRows()

void casacore::ImageAttrGroupHDF5::checkRows ( const String attrName,
uInt  rownr 
)
private

Check the rownr and add a row if needed.

◆ dataType()

virtual DataType casacore::ImageAttrGroupHDF5::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::ImageAttrGroupHDF5::flush ( HDF5Group image,
const String attrGroupName 
)

Flush the attibrutes if needed.

◆ getData()

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

Get the data of the given attribute in the given row.

Implements casacore::ImageAttrGroup.

◆ getDataRow()

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

Get the data of all attributes in a rows.

Implements casacore::ImageAttrGroup.

◆ getMeasInfo()

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

Get the possible measure info as type,Ref (stored as attrName_MEASINFO).

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

Implements casacore::ImageAttrGroup.

◆ getUnit()

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

Get the possible units of the values (stored as attrName_UNIT).

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

Implements casacore::ImageAttrGroup.

◆ hasAttr()

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

Test if an attribute exists.

Implements casacore::ImageAttrGroup.

◆ isNull()

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

Test if it is a null object.

Definition at line 75 of file ImageAttrGroupHDF5.h.

References casacore::RecordInterface::empty(), and itsRecord.

◆ nrows()

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

Get the number of rows in the group.

Implements casacore::ImageAttrGroup.

◆ putData()

virtual void casacore::ImageAttrGroupHDF5::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

◆ itsCanWrite

Bool casacore::ImageAttrGroupHDF5::itsCanWrite
private

Definition at line 125 of file ImageAttrGroupHDF5.h.

◆ itsChanged

Bool casacore::ImageAttrGroupHDF5::itsChanged
private

Definition at line 124 of file ImageAttrGroupHDF5.h.

◆ itsRecord

Record casacore::ImageAttrGroupHDF5::itsRecord
private

Definition at line 123 of file ImageAttrGroupHDF5.h.

Referenced by isNull().


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