Public Member Functions | Protected Member Functions

H5::H5Object Class Reference

List of all members.

Public Member Functions

Protected Member Functions


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

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.

References H5::IdComponent::inMemFunc().

Referenced by createAttribute().

void H5::H5Object::dereference ( Attribute attr,
const void *  ref,
H5R_type_t  ref_type = H5R_OBJECT 
)

Dereferences a reference into an HDF5 object, given an attribute.

Parameters:
attr - IN: Attribute specifying the location of the referenced object
ref - IN: Reference pointer
ref_type - IN: Reference type
Exceptions:
H5::ReferenceException 

References H5::Exception::getDetailMsg().

void H5::H5Object::dereference ( H5Object obj,
const void *  ref,
H5R_type_t  ref_type = H5R_OBJECT 
)

Dereferences a reference into an HDF5 object, given an HDF5 object.

Parameters:
obj - IN: Object specifying the location of the referenced object
ref - IN: Reference pointer
ref_type - IN: Reference type
Exceptions:
H5::ReferenceException 

References H5::Exception::getDetailMsg().

void H5::H5Object::dereference ( H5File h5file,
const void *  ref,
H5R_type_t  ref_type = H5R_OBJECT 
)

Dereferences a reference into an HDF5 object, given an HDF5 file.

Parameters:
h5file - IN: HDF5 file specifying the location of the referenced object
ref - IN: Reference pointer
ref_type - IN: Reference type
Exceptions:
H5::ReferenceException 

References H5::Exception::getDetailMsg().

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.

References H5::IdComponent::inMemFunc().

H5std_string H5::H5Object::getFileName (  )  const

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

Returns:
File name
Exceptions:
H5::IdComponentException 

References H5::Exception::getDetailMsg(), and H5::IdComponent::inMemFunc().

int H5::H5Object::getNumAttrs (  )  const

Returns the number of attributes attached to this HDF5 object.

Returns:
Number of attributes
Exceptions:
H5::AttributeIException 

References H5::IdComponent::inMemFunc().

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: http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-Create2

References H5::IdComponent::inMemFunc().

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 

References H5::IdComponent::inMemFunc().

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 

References H5::IdComponent::inMemFunc().

Referenced by openAttribute().

void H5::H5Object::reference ( void *  ref,
const H5std_string &  name 
) const

This is an overloaded function, provided for your convenience. It differs from the above function in that it takes an H5std_string for the object's name.

Parameters:
ref - IN: Reference pointer
name - IN: Name of the object to be referenced - H5std_string

References reference().

void H5::H5Object::reference ( void *  ref,
const char *  name 
) const

This is an overloaded function, provided for your convenience. It differs from the above function in that it only creates a reference to an HDF5 object, not to a dataset region.

Parameters:
ref - IN: Reference pointer
name - IN: Name of the object to be referenced - char pointer
Exceptions:
H5::IdComponentException 
Description

References H5::Exception::getDetailMsg().

void H5::H5Object::reference ( void *  ref,
const char *  name,
const DataSpace dataspace,
H5R_type_t  ref_type = H5R_DATASET_REGION 
) const

Creates a reference to an HDF5 object or a dataset region.

Parameters:
ref - IN: Reference pointer
name - IN: Name of the object to be referenced
dataspace - IN: Dataspace with selection
ref_type - IN: Type of reference to query, valid values are:

  • H5R_OBJECT - Reference is an object reference.
  • H5R_DATASET_REGION - Reference is a dataset region reference. - this is the default
Exceptions:
H5::IdComponentException 

References H5::Exception::getDetailMsg().

Referenced by reference().

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 

References H5::IdComponent::inMemFunc().

Referenced by removeAttr().

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 

References H5::IdComponent::inMemFunc().

Referenced by renameAttr().