casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
casa::HDF5Object Class Reference

An abstract base class representing an HDF5 object. More...

#include <HDF5Object.h>

Inheritance diagram for casa::HDF5Object:
casa::HDF5DataSet casa::HDF5File casa::HDF5Group

List of all members.

Public Member Functions

 HDF5Object ()
 Default constructor sets to invalid hid.
virtual ~HDF5Object ()
 The destructor in a derived class should close the hid appropriately.
virtual void close ()=0
 Close the hid if valid.
bool isValid () const
 Is it a valid hid?
hid_t getHid () const
 Get the hid.
 operator hid_t () const
 Convert automatically to hid_t.
void setName (const String &name)
 Get or set the name.
const StringgetName () const

Static Public Member Functions

static Bool hasHDF5Support ()
 Check if there is HDF5 support compiled in.
static void throwNoHDF5 ()
 If no HDF5, throw an exception that HDF5 is not supported.

Protected Member Functions

void setHid (hid_t hid)
 Set the hid.
void clearHid ()
 Clear the hid (set to invalid).

Private Member Functions

 HDF5Object (const HDF5Object &that)
 Copy constructor cannot be used.
HDF5Objectoperator= (const HDF5Object &that)
 Assignment cannot be used.

Private Attributes

hid_t itsHid
String itsName

Detailed Description

An abstract base class representing an HDF5 object.

Intended use:

Public interface

Review Status

Test programs:
tHDF5Dataset

Synopsis

This class wraps a basic HDF5 object. It offers several benefits:

Definition at line 82 of file HDF5Object.h.


Constructor & Destructor Documentation

Default constructor sets to invalid hid.

Definition at line 86 of file HDF5Object.h.

References casa::check_hid_t(), and casa::check_hsize_t().

virtual casa::HDF5Object::~HDF5Object ( ) [virtual]

The destructor in a derived class should close the hid appropriately.

casa::HDF5Object::HDF5Object ( const HDF5Object that) [private]

Copy constructor cannot be used.


Member Function Documentation

void casa::HDF5Object::clearHid ( ) [inline, protected]

Clear the hid (set to invalid).

Definition at line 131 of file HDF5Object.h.

References itsHid.

virtual void casa::HDF5Object::close ( ) [pure virtual]

Close the hid if valid.

Implemented in casa::HDF5DataSet, casa::HDF5File, and casa::HDF5Group.

hid_t casa::HDF5Object::getHid ( ) const [inline]

Get the hid.

Definition at line 107 of file HDF5Object.h.

References itsHid.

Referenced by casa::HDF5File::isClosed().

const String& casa::HDF5Object::getName ( ) const [inline]

Definition at line 118 of file HDF5Object.h.

References itsName.

Referenced by casa::HDF5Lattice< Bool >::arrayName(), and casa::HDF5Group::HDF5Group().

Check if there is HDF5 support compiled in.

Referenced by casa::canUseHDF5Image().

bool casa::HDF5Object::isValid ( ) const [inline]

Is it a valid hid?

Definition at line 103 of file HDF5Object.h.

References itsHid.

casa::HDF5Object::operator hid_t ( ) const [inline]

Convert automatically to hid_t.

Definition at line 111 of file HDF5Object.h.

References itsHid.

HDF5Object& casa::HDF5Object::operator= ( const HDF5Object that) [private]

Assignment cannot be used.

void casa::HDF5Object::setHid ( hid_t  hid) [inline, protected]

Set the hid.

Definition at line 127 of file HDF5Object.h.

References itsHid.

void casa::HDF5Object::setName ( const String name) [inline]

Get or set the name.

Definition at line 116 of file HDF5Object.h.

References itsName, and casa::name().

static void casa::HDF5Object::throwNoHDF5 ( ) [static]

If no HDF5, throw an exception that HDF5 is not supported.


Member Data Documentation

Definition at line 136 of file HDF5Object.h.

Referenced by clearHid(), getHid(), isValid(), operator hid_t(), and setHid().

Reimplemented in casa::HDF5File.

Definition at line 137 of file HDF5Object.h.

Referenced by getName(), and setName().


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