HDF5 C++ API Reference Manual

 

 

 

Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Examples

H5::H5Object Class Reference

#include <H5Object.h>

Inheritance diagram for H5::H5Object:

H5::IdComponent H5::AbstractDs H5::DataType H5::Group H5::Attribute H5::DataSet H5::ArrayType H5::AtomType H5::CompType H5::EnumType H5::VarLenType H5::FloatType H5::IntType H5::PredType H5::StrType List of all members.

Public Member Functions

Attribute createAttribute (const char *name, const DataType &type, const DataSpace &space, const PropList &create_plist=PropList::DEFAULT) const
 Creates an attribute for a group, dataset, or named datatype.
Attribute createAttribute (const H5std_string &name, const DataType &type, const DataSpace &space, const PropList &create_plist=PropList::DEFAULT) const
 This is an overloaded member function, provided for convenience. It differs from the above function in that it takes a reference to an H5std_string for name.
Attribute openAttribute (const char *name) const
 Opens an attribute given its name.
Attribute openAttribute (const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function in that it takes a reference to an H5std_string for name.
Attribute openAttribute (const unsigned int idx) const
 Opens an attribute given its index.
void flush (H5F_scope_t scope) const
 Flushes all buffers associated with a file to disk.
H5std_string getFileName () const
 Gets the name of the file, in which this HDF5 object belongs.
int getNumAttrs () const
 Returns the number of attributes attached to this HDF5 object.
int iterateAttrs (attr_operator_t user_op, unsigned *idx=NULL, void *op_data=NULL)
 Iterates a user's function over all the attributes of an H5 object, which may be a group, dataset or named datatype.
void removeAttr (const char *name) const
 Removes the named attribute from this object.
void removeAttr (const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function in that it takes a reference to an H5std_string for name.
void renameAttr (const char *oldname, const char *newname) const
 Renames the named attribute from this object.
void renameAttr (const H5std_string &oldname, const H5std_string &newname) const
 This is an overloaded member function, provided for convenience. It differs from the above function in that it takes a reference to an H5std_string for the names.
 H5Object (const H5Object &original)
 Copy constructor: makes a copy of the original H5Object instance.
virtual ~H5Object ()
 Noop destructor.

Constructor & Destructor Documentation

H5::H5Object::H5Object const H5Object original  ) 
 

Copy constructor: makes a copy of the original H5Object instance.

Parameters:
original - IN: H5Object instance to copy

H5::H5Object::~H5Object  )  [virtual]
 

Noop destructor.


Member Function Documentation

Attribute H5::H5Object::createAttribute const char *  name,
const DataType data_type,
const DataSpace data_space,
const PropList create_plist = PropList::DEFAULT
const
 

Creates an attribute for a group, dataset, or named datatype.

Parameters:
name - IN: Name of the attribute
data_type - IN: Datatype for the attribute
data_space - IN: Dataspace for the attribute - only simple dataspaces are allowed at this time
create_plist - IN: Creation property list - default to PropList::DEFAULT
Returns:
Attribute instance
Exceptions:
H5::AttributeIException 
Description
The attribute name specified in name must be unique. Attempting to create an attribute with the same name as an existing attribute will raise an exception, leaving the pre-existing attribute intact. To overwrite an existing attribute with a new attribute of the same name, first delete the existing one with H5Object::removeAttr, then recreate it with this function.

Attribute H5::H5Object::createAttribute const H5std_string &  name,
const DataType data_type,
const DataSpace data_space,
const PropList create_plist = PropList::DEFAULT
const
 

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

Attribute H5::H5Object::openAttribute const char *  name  )  const
 

Opens an attribute given its name.

Parameters:
name - IN: Name of the attribute
Returns:
Attribute instance
Exceptions:
H5::AttributeIException 

Attribute H5::H5Object::openAttribute const H5std_string &  name  )  const
 

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

Attribute H5::H5Object::openAttribute const unsigned int  idx  )  const
 

Opens an attribute given its index.

Parameters:
idx - IN: Index of the attribute, a 0-based, non-negative integer
Returns:
Attribute instance
Exceptions:
H5::AttributeIException 

void H5::H5Object::flush H5F_scope_t  scope  )  const
 

Flushes all buffers associated with a file to disk.

Parameters:
scope - IN: Specifies the scope of the flushing action, which can be either of these values:
  • H5F_SCOPE_GLOBAL - Flushes the entire virtual file
  • H5F_SCOPE_LOCAL - Flushes only the specified file
Exceptions:
H5::AttributeIException 
Description
This object is used to identify the file to be flushed.

H5std_string H5::H5Object::getFileName  )  const
 

Gets the name of the file, in which this HDF5 object belongs.

Returns:
File name
Exceptions:
H5::IdComponentException 

int H5::H5Object::getNumAttrs  )  const
 

Returns the number of attributes attached to this HDF5 object.

Returns:
Number of attributes
Exceptions:
H5::AttributeIException 

int H5::H5Object::iterateAttrs attr_operator_t  user_op,
unsigned *  idx = NULL,
void *  op_data = NULL
 

Iterates a user's function over all the attributes of an H5 object, which may be a group, dataset or named datatype.

Parameters:
user_op - IN: User's function to operate on each attribute
idx - IN/OUT: Starting (IN) and ending (OUT) attribute indices
op_data - IN: User's data to pass to user's operator function
Returns:
Returned value of the last operator if it was non-zero, or zero if all attributes were processed
Exceptions:
H5::AttributeIException 
Description
For information, please refer to the C layer Reference Manual at: ../RM_H5A.html#Annot-Iterate

void H5::H5Object::removeAttr const char *  name  )  const
 

Removes the named attribute from this object.

Parameters:
name - IN: Name of the attribute to be removed
Exceptions:
H5::AttributeIException 

void H5::H5Object::removeAttr const H5std_string &  name  )  const
 

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

void H5::H5Object::renameAttr const char *  oldname,
const char *  newname
const
 

Renames the named attribute from this object.

Parameters:
oldname - IN: Name of the attribute to be renamed
newname - IN: New name ame of the attribute
Exceptions:
H5::AttributeIException 

void H5::H5Object::renameAttr const H5std_string &  oldname,
const H5std_string &  newname
const
 

This is an overloaded member function, provided for convenience. It differs from the above function in that it takes a reference to an H5std_string for the names.


Generated on Tue Aug 14 13:57:00 2007 by  doxygen 1.3.9.1