casacore
|
A class representing an HDF5 group. More...
#include <HDF5Group.h>
Public Member Functions | |
HDF5Group () | |
Construct from given hid. More... | |
HDF5Group (const HDF5Object &parentHid, const String &name, bool mustExist=false, bool mustNotExist=false) | |
Open or create a group at the given hid. More... | |
HDF5Group (hid_t parentHid, const String &name, bool mustExist=false, bool mustNotExist=false) | |
virtual | ~HDF5Group () |
The destructor closes the hid. More... | |
virtual void | close () |
Close the hid if valid. More... | |
Public Member Functions inherited from casacore::HDF5Object | |
HDF5Object () | |
Default constructor sets to invalid hid. More... | |
virtual | ~HDF5Object () |
The destructor in a derived class should close the hid appropriately. More... | |
bool | isValid () const |
Is it a valid hid? More... | |
hid_t | getHid () const |
Get the hid. More... | |
operator hid_t () const | |
Convert automatically to hid_t. More... | |
void | setName (const String &name) |
Get or set the name. More... | |
const String & | getName () const |
Static Public Member Functions | |
static std::vector< String > | linkNames (const HDF5Object &parentHid) |
Get the names of all links at the given hid. More... | |
static bool | exists (const HDF5Object &parentHid, const String &name) |
Test if the group at the given hid exists. More... | |
static void | remove (const HDF5Object &parentHid, const String &name) |
Delete group at the given hid if it exists. More... | |
Static Public Member Functions inherited from casacore::HDF5Object | |
static Bool | hasHDF5Support () |
Check if there is HDF5 support compiled in. More... | |
static void | throwNoHDF5 () |
If no HDF5, throw an exception that HDF5 is not supported. More... | |
Private Member Functions | |
HDF5Group (const HDF5Group &that) | |
Copy constructor cannot be used. More... | |
HDF5Group & | operator= (const HDF5Group &that) |
Assignment cannot be used. More... | |
void | init (hid_t parentHid, const String &parentName, const String &name, bool mustExist=false, bool mustNotExist=false) |
Initialize (execute the constructor). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from casacore::HDF5Object | |
void | setHid (hid_t hid) |
Set the hid. More... | |
void | clearHid () |
Clear the hid (set to invalid). More... | |
A class representing an HDF5 group.
Public interface
This class wraps an HDF5 group hid (hdf5 id). It offers two benefits:
Definition at line 54 of file HDF5Group.h.
|
inline |
Construct from given hid.
Definition at line 58 of file HDF5Group.h.
|
inline |
Open or create a group at the given hid.
Default is that the group may exist; it is created if not existing.
Definition at line 64 of file HDF5Group.h.
References casacore::HDF5Object::getName(), and init().
|
inline |
Definition at line 68 of file HDF5Group.h.
References init().
|
virtual |
The destructor closes the hid.
|
private |
Copy constructor cannot be used.
|
virtual |
Close the hid if valid.
Implements casacore::HDF5Object.
|
static |
Test if the group at the given hid exists.
|
private |
Initialize (execute the constructor).
Referenced by HDF5Group().
|
static |
Get the names of all links at the given hid.
Assignment cannot be used.
|
static |
Delete group at the given hid if it exists.