HDF5 C++ API Reference Manual

- Main Page
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

# H5::Group Class Reference

`#include <H5Group.h>`

Inheritance diagram for H5::Group:

List of all members.

## Public Member Functions
virtual void | close ()
| Closes this group.
H5G_obj_t | getObjType (void *ref, H5R_type_t ref_type=H5R_OBJECT) const
| This function was misnamed and will be deprecated in favor of H5Object::getRefObjType; please use getRefObjType instead.
DataSpace | getRegion (void *ref, H5R_type_t ref_type=H5R_DATASET_REGION) const
| Retrieves a dataspace with the region pointed to selected.
virtual H5std_string | fromClass () const
virtual void | throwException (const H5std_string &func_name, const H5std_string &msg) const
| Throws H5::GroupIException.
virtual hid_t | getLocId () const
| Returns the id of this group.
| Group (H5Object &obj, void *ref, H5R_type_t ref_type=H5R_OBJECT)
| Given a reference, ref, to an hdf5 group, creates a Group object.
| Group (H5File &h5file, void *ref, H5R_type_t ref_type=H5R_OBJECT)
| Given a reference, ref, to an hdf5 group, creates a Group object.
| Group (Attribute &attr, void *ref, H5R_type_t ref_type=H5R_OBJECT)
| Given a reference, ref, to an hdf5 group, creates a Group object.
| Group ()
| Default constructor: creates a stub Group.
| Group (const Group &original)
| Copy constructor: makes a copy of the original Group object.
virtual hid_t | getId () const
| Group (const hid_t group_id)
| Creates a Group object using the id of an existing group.
virtual | ~Group ()
| Properly terminates access to this group.
## Protected Member Functions
virtual void | p_setId (const hid_t new_id)
| Sets the identifier of this group to a new value.

## Detailed Description

Examples:

  h5group.cpp.

## Constructor & Destructor Documentation

H5::Group::Group | ( | H5Object & | obj,
|  | void * | ref,
|  | H5R_type_t | ref_type = `H5R_OBJECT` |
| ) |  |  |

Given a reference, ref, to an hdf5 group, creates a Group object.

Parameters:

  | obj | - IN: Specifying location referenced object is in
  | ref | - IN: Reference pointer
  | ref_type | - IN: Reference type - default to H5R_OBJECT

Exceptions:

  | H5::ReferenceException |

Description
  `obj` can be DataSet, Group, or named DataType, that is a datatype that has been named by DataType::commit.

H5::Group::Group | ( | H5File & | h5file,
|  | void * | ref,
|  | H5R_type_t | ref_type = `H5R_OBJECT` |
| ) |  |  |

Given a reference, ref, to an hdf5 group, creates a Group object.

Parameters:

  | h5file | - IN: Location referenced object is in
  | ref | - IN: Reference pointer
  | ref_type | - IN: Reference type - default to H5R_OBJECT

Exceptions:

  | H5::ReferenceException |

H5::Group::Group | ( | Attribute & | attr,
|  | void * | ref,
|  | H5R_type_t | ref_type = `H5R_OBJECT` |
| ) |  |  |

Given a reference, ref, to an hdf5 group, creates a Group object.

Parameters:

  | attr | - IN: Specifying location where the referenced object is in
  | ref | - IN: Reference pointer
  | ref_type | - IN: Reference type - default to H5R_OBJECT

Exceptions:

  | H5::ReferenceException |

H5::Group::Group | ( |  | ) |

Default constructor: creates a stub Group.

H5::Group::Group | ( | const Group & | original | ) |

Copy constructor: makes a copy of the original Group object.

Parameters:

  | original | - IN: Original group to copy

H5::Group::Group | ( | const hid_t | existing_id | ) |

Creates a Group object using the id of an existing group.

Parameters:

  | group_id | - IN: Id of an existing group

H5::Group::~Group | ( |  | ) | `[virtual]`

Properly terminates access to this group.

## Member Function Documentation

void H5::Group::close | ( |  | ) | `[virtual]`

Closes this group.

Exceptions:

  | H5::GroupIException |

H5G_obj_t H5::Group::getObjType | ( | void * | ref,
|  | H5R_type_t | ref_type = `H5R_OBJECT` |
| ) |  |  | const

This function was misnamed and will be deprecated in favor of H5Object::getRefObjType; please use getRefObjType instead.

DataSpace H5::Group::getRegion | ( | void * | ref,
|  | H5R_type_t | ref_type = `H5R_DATASET_REGION` |
| ) |  |  | const

Retrieves a dataspace with the region pointed to selected.

Parameters:

  | ref | - IN: Reference to get region of ref_type - IN: Type of reference to get region of - default

Returns:
  DataSpace instance

Exceptions:

  | H5::GroupIException |

virtual H5std_string H5::Group::fromClass | ( |  | ) | const`[inline, virtual]`

void H5::Group::throwException | ( | const H5std_string & | func_name,
|  | const H5std_string & | msg |
| ) |  |  | const`[virtual]`

Throws H5::GroupIException.

Parameters:

  | func_name | - Name of the function where failure occurs
  | msg | - Message describing the failure

Exceptions:

  | H5::GroupIException |

Implements H5::CommonFG.

hid_t H5::Group::getLocId | ( |  | ) | const`[virtual]`

Returns the id of this group.

Returns:
  Id of this group

hid_t H5::Group::getId | ( |  | ) | const`[virtual]`

Implements H5::IdComponent.

void H5::Group::p_setId | ( | const hid_t | new_id | ) | `[protected, virtual]`

Sets the identifier of this group to a new value.

Exceptions:

  | H5::IdComponentException | when the attempt to close the currently open group fails