HDF5 C++ API  1.8.20
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Static Public Member Functions | List of all members
H5::IdComponent Class Reference

Class IdComponent provides wrappers of the C functions that operate on an HDF5 identifier. More...

#include <H5IdComponent.h>

Inheritance diagram for H5::IdComponent:
H5::DataSpace H5::H5Location H5::PropList H5::Attribute H5::H5Object H5::DSetMemXferPropList H5::FileAccPropList H5::FileCreatPropList H5::LinkAccPropList H5::ObjCreatPropList H5::DataSet H5::DataType H5::Group H5::DSetCreatPropList H5::ArrayType H5::AtomType H5::CompType H5::EnumType H5::VarLenType H5::H5File H5::FloatType H5::IntType H5::PredType H5::StrType

Public Member Functions

void incRefCount (const hid_t obj_id) const
 Increment reference counter for a given id. More...
 
void incRefCount () const
 Increment reference counter for the id of this object. More...
 
void decRefCount (const hid_t obj_id) const
 Decrement reference counter for a given id. More...
 
void decRefCount () const
 Decrement reference counter for the id of this object. More...
 
int getCounter (const hid_t obj_id) const
 Returns the reference counter for a given id. More...
 
int getCounter () const
 Returns the reference counter for the id of this object. More...
 
H5I_type_t getHDFObjType () const
 Returns the type of the object. It is an overloaded function of the above function. More...
 
IdComponentoperator= (const IdComponent &rhs)
 Assignment operator. More...
 
void setId (const hid_t new_id)
 Sets the identifier of this object to a new value. More...
 
virtual ~IdComponent ()
 Noop destructor. More...
 

Static Public Member Functions

static H5I_type_t getHDFObjType (const hid_t obj_id)
 Given an id, returns the type of the object. More...
 
static bool isValid (hid_t an_id)
 Checks if the given ID is valid. More...
 

Detailed Description

In most cases, the C library handles these operations and an application rarely needs them.

Constructor & Destructor Documentation

H5::IdComponent::~IdComponent ( )
virtual

Member Function Documentation

void H5::IdComponent::decRefCount ( const hid_t  obj_id) const
void H5::IdComponent::decRefCount ( ) const
int H5::IdComponent::getCounter ( const hid_t  obj_id) const
Returns
Reference count
int H5::IdComponent::getCounter ( ) const
Returns
Reference count
H5I_type_t H5::IdComponent::getHDFObjType ( const hid_t  obj_id)
static
Returns
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.
H5I_type_t H5::IdComponent::getHDFObjType ( ) const
Returns
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.
void H5::IdComponent::incRefCount ( const hid_t  obj_id) const
void H5::IdComponent::incRefCount ( ) const
bool H5::IdComponent::isValid ( hid_t  an_id)
static
Returns
true if the given identifier is valid, and false, otherwise.
Description
A valid ID is one that is in use and has an application reference count of at least 1.
IdComponent & H5::IdComponent::operator= ( const IdComponent rhs)
Parameters
rhs- IN: Reference to the existing object
Returns
Reference to IdComponent instance
Exceptions
H5::IdComponentExceptionwhen attempt to close the HDF5 object fails

References H5::Exception::getDetailMsg(), and setId().

void H5::IdComponent::setId ( const hid_t  new_id)
Parameters
new_id- IN: New identifier to be set to
Exceptions
H5::IdComponentExceptionwhen the attempt to close the HDF5 object fails

References incRefCount().

Referenced by H5::ArrayType::operator=(), operator=(), and H5::DataType::operator=().


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


The HDF Group Help Desk:
  Copyright by The HDF Group
and the Board of Trustees of the University of Illinois