Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-07-28 The HDF5 Field Guide

Loading...
Searching...
No Matches
CommonFG Class Referenceabstract

`#include <c++/src/H5CommonFG.h>`

## Detailed Description

CommonFG is an abstract base class of H5Group.

Inheritance diagram for CommonFG:

## Public Member Functions
| CommonFG ()
| Default constructor.
virtual hid_t | getLocId () const =0
ArrayType | openArrayType (const char *name) const
| Opens the named array datatype at this location.
ArrayType | openArrayType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
CompType | openCompType (const char *name) const
| Opens the named compound datatype at this location.
CompType | openCompType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
DataType | openDataType (const char *name) const
| Opens the named generic datatype at this location.
DataType | openDataType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
EnumType | openEnumType (const char *name) const
| Opens the named enumeration datatype at this location.
EnumType | openEnumType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
FloatType | openFloatType (const char *name) const
| Opens the named floating-point datatype at this location.
FloatType | openFloatType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
IntType | openIntType (const char *name) const
| Opens the named integer datatype at this location.
IntType | openIntType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
StrType | openStrType (const char *name) const
| Opens the named string datatype at this location.
StrType | openStrType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
VarLenType | openVarLenType (const char *name) const
| Opens the named variable length datatype at this location.
VarLenType | openVarLenType (const std::string &name) const
| This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.
virtual void | throwException (const std::string &func_name, const std::string &msg) const =0
| For subclasses, H5File and Group, to throw appropriate exception.
virtual | ~CommonFG ()=default

## Protected Member Functions
virtual void | p_setId (const hid_t new_id)=0

## Constructor & Destructor Documentation

## ◆ CommonFG()

CommonFG | ( |  | ) |

Default constructor.

## ◆ ~CommonFG()

virtual ~CommonFG | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ getLocId()

virtual hid_t getLocId | ( |  | ) | const
| pure virtual

For subclasses, H5File and Group, to return the correct object id, i.e. file or group id.

Implemented in Group, and H5File.

## ◆ openArrayType() [1/2]

ArrayType openArrayType | ( | const char * | name | ) | const

Opens the named array datatype at this location.

Parameters

  name | - IN: Name of the array datatype to open

Returns
  ArrayType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openArrayType() [2/2]

ArrayType openArrayType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ openCompType() [1/2]

CompType openCompType | ( | const char * | name | ) | const

Opens the named compound datatype at this location.

Parameters

  name | - IN: Name of the compound datatype to open

Returns
  CompType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openCompType() [2/2]

CompType openCompType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ openDataType() [1/2]

DataType openDataType | ( | const char * | name | ) | const

Opens the named generic datatype at this location.

Parameters

  name | - IN: Name of the datatype to open

Returns
  DataType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openDataType() [2/2]

DataType openDataType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ openEnumType() [1/2]

EnumType openEnumType | ( | const char * | name | ) | const

Opens the named enumeration datatype at this location.

Parameters

  name | - IN: Name of the enumeration datatype to open

Returns
  EnumType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openEnumType() [2/2]

EnumType openEnumType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ openFloatType() [1/2]

FloatType openFloatType | ( | const char * | name | ) | const

Opens the named floating-point datatype at this location.

Parameters

  name | - IN: Name of the floating-point datatype to open

Returns
  FloatType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openFloatType() [2/2]

FloatType openFloatType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ openIntType() [1/2]

IntType openIntType | ( | const char * | name | ) | const

Opens the named integer datatype at this location.

Parameters

  name | - IN: Name of the integer datatype to open

Returns
  IntType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openIntType() [2/2]

IntType openIntType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ openStrType() [1/2]

StrType openStrType | ( | const char * | name | ) | const

Opens the named string datatype at this location.

Parameters

  name | - IN: Name of the string datatype to open

Returns
  StrType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openStrType() [2/2]

StrType openStrType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ openVarLenType() [1/2]

VarLenType openVarLenType | ( | const char * | name | ) | const

Opens the named variable length datatype at this location.

Parameters

  name | - IN: Name of the variable length datatype to open

Returns
  VarLenType instance

Exceptions

  H5::FileIException | or H5::GroupIException

## ◆ openVarLenType() [2/2]

VarLenType openVarLenType | ( | const std::string & | name | ) | const

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an `H5std_string` for name.

## ◆ p_setId()

virtual void p_setId | ( | const hid_t | new_id | ) |
| protected pure virtual

Implemented in Group, and H5File.

## ◆ throwException()

virtual void throwException | ( | const std::string & | func_name,
|  | const std::string & | msg ) const
| pure virtual

For subclasses, H5File and Group, to throw appropriate exception.

Implemented in Group, and H5File.

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

- c++/src/H5CommonFG.h
- c++/src/H5CommonFG.cpp