Hdf5Group Class Reference

The Hdf5Group class is a composite object to hierarchically store groups and datasets. More...

#include <Hdf5Group.h>

Inheritance diagram for Hdf5Group:

Inheritance graph

List of all members.

Public Member Functions

virtual Hdf5DatasetaddDataset (const std::string &name)
virtual Hdf5GroupaddGroup (const std::string &name)
virtual const std::vector
< Hdf5Element * > & 
getElements () const
virtual const Hdf5ElementgetElement (const std::string &name) const
virtual const Hdf5ElementgetElementByPath (const std::string &path) const
virtual size_t getNumElements () const
virtual bool removeElement (const Hdf5Element *pElement)

Protected Member Functions

 Hdf5Group (Hdf5Node *pParent, const std::string &name)
virtual ~Hdf5Group ()


Detailed Description

The Hdf5Group class is a composite object to hierarchically store groups and datasets.

Definition at line 25 of file Hdf5Group.h.


Constructor & Destructor Documentation

Hdf5Group::Hdf5Group ( Hdf5Node pParent,
const std::string &  name 
) [explicit, protected]

Creates an empty HDF group.

virtual Hdf5Group::~Hdf5Group (  )  [protected, virtual]

Destroys the HDF group.


Member Function Documentation

virtual Hdf5Dataset* Hdf5Group::addDataset ( const std::string &  name  )  [virtual]

Adds a dataset to the HDF group.

Parameters:
name The name of the dataset to add.
Returns:
A pointer to the newly added HDF dataset. Returns NULL if the operation failed.
See also:
Hdf5Dataset::Hdf5Dataset()

virtual Hdf5Group* Hdf5Group::addGroup ( const std::string &  name  )  [virtual]

virtual const std::vector<Hdf5Element*>& Hdf5Group::getElements (  )  const [virtual]

Returns a vector of the group's elements.

Returns:
A vector of the group's elements.

virtual const Hdf5Element* Hdf5Group::getElement ( const std::string &  name  )  const [virtual]

Non-recursively searches the group's element for a dataset matching the input name.

Parameters:
name The name of the Hdf5Element to search for.
Returns:
A pointer to the element with the given name; NULL if it does not exist.

virtual const Hdf5Element* Hdf5Group::getElementByPath ( const std::string &  path  )  const [virtual]

Locates the given element with the given path.

Parameters:
path The path to use to locate the element. The elements in the path should be separted with "/". A leading slash may be present and will be ignored. The element names cannot themselves contain a slash, this should be enforced by the HDF5 library.
Returns:
A pointer to the element with the given name; NULL if it does not exist.

virtual size_t Hdf5Group::getNumElements (  )  const [virtual]

Returns the number of Hdf5Elements in the group.

Returns:
Returns the number of elements in the group. Equivalent to getElements().size().

virtual bool Hdf5Group::removeElement ( const Hdf5Element pElement  )  [virtual]

Removes an element from the group.

Parameters:
pElement A pointer to the dataset that will be removed.
Returns:
TRUE if the operation succeeded, otherwise FALSE.
See also:
Hdf5Dataset::~Hdf5Dataset(), Hdf5Group::~Hdf5Group


Software Development Kit - Opticks 4.9.0 Build 16218