HDF5 C++ API Reference Manual

- Main Page
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

# H5::IdComponent Class Reference

`#include <H5IdComponent.h>`

Inheritance diagram for H5::IdComponent:

List of all members.

## Public Member Functions
void | incRefCount (const hid_t obj_id) const
| Increment reference counter for a given id.
void | incRefCount () const
| Increment reference counter for the id of this object.
void | decRefCount (const hid_t obj_id) const
| Decrement reference counter for a given id.
void | decRefCount () const
| Decrement reference counter for the id of this object.
int | getCounter (const hid_t obj_id) const
| Returns the reference counter for a given id.
int | getCounter () const
| Returns the reference counter for the id of this object.
IdComponent & | operator= (const IdComponent &rhs)
| Assignment operator.
virtual hid_t | getId () const =0
void | setId (const hid_t new_id)
| Sets the identifier of this object to a new value.
| IdComponent (const hid_t h5_id)
| Creates an IdComponent object using the id of an existing object.
| IdComponent (const IdComponent &original)
| Copy constructor: makes a copy of the original IdComponent object.
virtual | ~IdComponent ()
| Noop destructor.
## Static Public Member Functions
static H5I_type_t | getHDFObjType (const hid_t obj_id)
| Given an id, returns the type of the object. return a valid HDF object type, which may be one of the following:.

## Constructor & Destructor Documentation

H5::IdComponent::IdComponent | ( | const hid_t | h5_id | ) |

Creates an IdComponent object using the id of an existing object.

Parameters:

  | h5_id | - IN: Id of an existing object

Exceptions:

  | H5::DataTypeIException |

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

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

Parameters:

  | original | - IN: IdComponent instance to copy

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

Noop destructor.

## Member Function Documentation

void H5::IdComponent::incRefCount | ( | const hid_t | obj_id | ) | const

Increment reference counter for a given id.

void H5::IdComponent::incRefCount | ( |  | ) | const

Increment reference counter for the id of this object.

void H5::IdComponent::decRefCount | ( | const hid_t | obj_id | ) | const

Decrement reference counter for a given id.

void H5::IdComponent::decRefCount | ( |  | ) | const

Decrement reference counter for the id of this object.

int H5::IdComponent::getCounter | ( | const hid_t | obj_id | ) | const

Returns the reference counter for a given id.

Returns:
  Reference count

int H5::IdComponent::getCounter | ( |  | ) | const

Returns the reference counter for the id of this object.

Returns:
  Reference count

H5I_type_t H5::IdComponent::getHDFObjType | ( | const hid_t | obj_id | ) | `[static]`

Given an id, returns the type of the object. return a valid HDF object type, which may be one of the following:.

- `H5I_FILE`
- `H5I_GROUP`
- `H5I_DATATYPE`
- `H5I_DATASPACE`
- `H5I_DATASET`
- `H5I_ATTR`
- or `H5I_BADID`, if no valid type can be determined or the input object id is invalid.

IdComponent & H5::IdComponent::operator= | ( | const IdComponent & | rhs | ) |

Assignment operator.

Parameters:

  | rhs | - IN: Reference to the existing object

Returns:
  Reference to IdComponent instance

Exceptions:

  | H5::IdComponentException | when attempt to close the HDF5 object fails

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

Implemented in H5::Attribute, H5::DataSet, H5::DataSpace, H5::DataType, H5::H5File, H5::Group, and H5::PropList.

void H5::IdComponent::setId | ( | const hid_t | new_id | ) |

Sets the identifier of this object to a new value.

Exceptions:

  | H5::IdComponentException | when the attempt to close the HDF5 object fails