HDF5 C++ API Reference Manual

 

 

 

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

H5::CommonFG Class Reference

#include <H5CommonFG.h>

Inheritance diagram for H5::CommonFG:

H5::Group H5::H5File List of all members.

Public Member Functions

Group createGroup (const char *name, size_t size_hint=0) const
 Creates a new group at this location which can be a file or another group.
Group createGroup (const H5std_string &name, size_t size_hint=0) 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.
Group openGroup (const char *name) const
 Opens an existing group in a location which can be a file or another group.
Group openGroup (const H5std_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.
DataSet createDataSet (const char *name, const DataType &data_type, const DataSpace &data_space, const DSetCreatPropList &create_plist=DSetCreatPropList::DEFAULT) const
 Creates a new dataset at this location.
DataSet createDataSet (const H5std_string &name, const DataType &data_type, const DataSpace &data_space, const DSetCreatPropList &create_plist=DSetCreatPropList::DEFAULT) 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.
DataSet openDataSet (const char *name) const
 Opens an existing dataset at this location.
DataSet openDataSet (const H5std_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.
H5std_string getComment (const H5std_string &name) const
 Retrieves comment for the specified object.
H5std_string getComment (const char *name, size_t bufsize) const
 Retrieves comment for the specified object and its comment's length.
H5std_string getComment (const H5std_string &name, size_t bufsize) 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.
void removeComment (const char *name) const
 Removes the comment from an object specified by its name.
void removeComment (const H5std_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.
void setComment (const char *name, const char *comment) const
 Sets or resets the comment for an object specified by its name.
void setComment (const H5std_string &name, const H5std_string &comment) 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 and comment.
H5std_string getLinkval (const char *name, size_t size) const
 Returns the name of the object that the symbolic link points to.
H5std_string getLinkval (const H5std_string &name, size_t size) 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.
hsize_t getNumObjs () const
 Returns the number of objects in this group.
void getObjinfo (const char *name, hbool_t follow_link, H5G_stat_t &statbuf) const
 Returns information about an object.
void getObjinfo (const H5std_string &name, hbool_t follow_link, H5G_stat_t &statbuf) 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.
void getObjinfo (const char *name, H5G_stat_t &statbuf) const
 This is an overloaded member function, provided for convenience. It differs from the above functions in that it doesn't have the paramemter follow_link.
void getObjinfo (const H5std_string &name, H5G_stat_t &statbuf) 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.
ssize_t getObjnameByIdx (hsize_t idx, H5std_string &name, size_t size) const
 Retrieves the name of an object in this group, given the object's index.
H5std_string getObjnameByIdx (hsize_t idx) const
 Returns the name of an object in this group, given the object's index.
H5G_obj_t getObjTypeByIdx (hsize_t idx) const
 Returns the type of an object in this group, given the object's index.
H5G_obj_t getObjTypeByIdx (hsize_t idx, H5std_string &type_name) const
 This is an overloaded member function, provided for convenience. It differs from the above function because it also provides the returned object type in text.
int iterateElems (const char *name, int *idx, H5G_iterate_t op, void *op_data)
 Iterates a user's function over the entries of a group.
int iterateElems (const H5std_string &name, int *idx, H5G_iterate_t op, void *op_data)
 This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an H5std_string for name.
void link (H5G_link_t link_type, const char *curr_name, const char *new_name) const
 Creates a link of the specified type from new_name to curr_name.
void link (H5G_link_t link_type, const H5std_string &curr_name, const H5std_string &new_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 curr_name and new_name.
void unlink (const char *name) const
 Removes the specified name at this location.
void unlink (const H5std_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.
void mount (const char *name, H5File &child, PropList &plist) const
 Mounts the file child onto this group.
void mount (const H5std_string &name, H5File &child, PropList &plist) 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.
void unmount (const char *name) const
 Unmounts the specified file.
void unmount (const H5std_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.
void move (const char *src, const char *dst) const
 Renames an object at this location.
void move (const H5std_string &src, const H5std_string &dst) const
 This is an overloaded member function, provided for convenience. It differs from the above function in that it takes an H5std_string for src and dst.
DataType openDataType (const char *name) const
 Opens the named generic datatype at this location.
DataType openDataType (const H5std_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.
ArrayType openArrayType (const char *name) const
 Opens the named array datatype at this location.
ArrayType openArrayType (const H5std_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 H5std_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 H5std_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 H5std_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 H5std_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 H5std_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 H5std_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 H5std_string &func_name, const H5std_string &msg) const =0
 For subclasses, H5File and Group, to throw appropriate exception.
 CommonFG ()
 Default constructor.
virtual ~CommonFG ()
 Noop destructor.

Constructor & Destructor Documentation

H5::CommonFG::CommonFG  ) 
 

Default constructor.

H5::CommonFG::~CommonFG  )  [virtual]
 

Noop destructor.


Member Function Documentation

Group H5::CommonFG::createGroup const char *  name,
size_t  size_hint = 0
const
 

Creates a new group at this location which can be a file or another group.

Parameters:
name - IN: Name of the group to create
size_hint - IN: Indicates the number of bytes to reserve for the names that will appear in the group
Returns:
Group instance
Exceptions:
H5::FileIException or H5::GroupIException
Description
The optional size_hint specifies how much file space to reserve for storing the names that will appear in this new group. If a non-positive value is provided for the size_hint then a default size is chosen.

Group H5::CommonFG::createGroup const H5std_string &  name,
size_t  size_hint = 0
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.

Group H5::CommonFG::openGroup const char *  name  )  const
 

Opens an existing group in a location which can be a file or another group.

Parameters:
name - IN: Name of the group to open
Returns:
Group instance
Exceptions:
H5::FileIException or H5::GroupIException

Group H5::CommonFG::openGroup const H5std_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.

DataSet H5::CommonFG::createDataSet const char *  name,
const DataType data_type,
const DataSpace data_space,
const DSetCreatPropList create_plist = DSetCreatPropList::DEFAULT
const
 

Creates a new dataset at this location.

Parameters:
name - IN: Name of the dataset to create
data_type - IN: Datatype of the dataset
data_space - IN: Dataspace for the dataset
create_plist - IN: Creation properly list for the dataset
Returns:
DataSet instance
Exceptions:
H5::FileIException or H5::GroupIException

DataSet H5::CommonFG::createDataSet const H5std_string &  name,
const DataType data_type,
const DataSpace data_space,
const DSetCreatPropList create_plist = DSetCreatPropList::DEFAULT
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.

DataSet H5::CommonFG::openDataSet const char *  name  )  const
 

Opens an existing dataset at this location.

Parameters:
name - IN: Name of the dataset to open
Returns:
DataSet instance
Exceptions:
H5::FileIException or H5::GroupIException

DataSet H5::CommonFG::openDataSet const H5std_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.

H5std_string H5::CommonFG::getComment const H5std_string &  name  )  const
 

Retrieves comment for the specified object.

Parameters:
name - IN: Name of the object
Returns:
Comment string
Exceptions:
H5::FileIException or H5::GroupIException

H5std_string H5::CommonFG::getComment const char *  name,
size_t  bufsize
const
 

Retrieves comment for the specified object and its comment's length.

Parameters:
name - IN: Name of the object
bufsize - IN: Length of the comment to retrieve
Returns:
Comment string
Exceptions:
H5::FileIException or H5::GroupIException

H5std_string H5::CommonFG::getComment const H5std_string &  name,
size_t  bufsize
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.

void H5::CommonFG::removeComment const char *  name  )  const
 

Removes the comment from an object specified by its name.

Parameters:
name - IN: Name of the object
Exceptions:
H5::FileIException or H5::GroupIException

void H5::CommonFG::removeComment const H5std_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.

void H5::CommonFG::setComment const char *  name,
const char *  comment
const
 

Sets or resets the comment for an object specified by its name.

Parameters:
name - IN: Name of the object
comment - IN: New comment
Exceptions:
H5::FileIException or H5::GroupIException
Description
If comment is an empty string or a null pointer, the comment message is removed from the object. Comments should be relatively short, null-terminated, ASCII strings. They can be attached to any object that has an object header, e.g., data sets, groups, named data types, and data spaces, but not symbolic links.

void H5::CommonFG::setComment const H5std_string &  name,
const H5std_string &  comment
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 and comment.

H5std_string H5::CommonFG::getLinkval const char *  name,
size_t  size
const
 

Returns the name of the object that the symbolic link points to.

Parameters:
name - IN: Symbolic link to the object
size - IN: Maximum number of characters of value to be returned
Returns:
Name of the object
Exceptions:
H5::FileIException or H5::GroupIException

H5std_string H5::CommonFG::getLinkval const H5std_string &  name,
size_t  size
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.

hsize_t H5::CommonFG::getNumObjs  )  const
 

Returns the number of objects in this group.

Returns:
Number of objects
Exceptions:
H5::FileIException or H5::GroupIException

void H5::CommonFG::getObjinfo const char *  name,
hbool_t  follow_link,
H5G_stat_t &  statbuf
const
 

Returns information about an object.

Parameters:
name - IN: Name of the object
follow_link - IN: Link flag
statbuf - OUT: Buffer to return information about the object
Exceptions:
H5::FileIException or H5::GroupIException
Description
For more information, please refer to the C layer Reference Manual at: ../RM_H5G.html#Group-GetObjinfo

void H5::CommonFG::getObjinfo const H5std_string &  name,
hbool_t  follow_link,
H5G_stat_t &  statbuf
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.

void H5::CommonFG::getObjinfo const char *  name,
H5G_stat_t &  statbuf
const
 

This is an overloaded member function, provided for convenience. It differs from the above functions in that it doesn't have the paramemter follow_link.

void H5::CommonFG::getObjinfo const H5std_string &  name,
H5G_stat_t &  statbuf
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.

ssize_t H5::CommonFG::getObjnameByIdx hsize_t  idx,
H5std_string &  name,
size_t  size
const
 

Retrieves the name of an object in this group, given the object's index.

Parameters:
idx - IN: Transient index of the object
name - IN/OUT: Retrieved name of the object
size - IN: Length to retrieve
Returns:
Actual size of the object name or 0, if object has no name
Exceptions:
H5::FileIException or H5::GroupIException
Description
The value of idx can be any nonnegative number less than the total number of objects in the group, which is returned by the function CommonFG::getNumObjs. Note that this is a transient index; thus, an object may have a different index each time the group is opened.

H5std_string H5::CommonFG::getObjnameByIdx hsize_t  idx  )  const
 

Returns the name of an object in this group, given the object's index.

Parameters:
idx - IN: Transient index of the object
Returns:
Object name
Exceptions:
H5::FileIException or H5::GroupIException
Description
The value of idx can be any nonnegative number less than the total number of objects in the group, which is returned by the function CommonFG::getNumObjs. Note that this is a transient index; thus, an object may have a different index each time the group is opened.

H5G_obj_t H5::CommonFG::getObjTypeByIdx hsize_t  idx  )  const
 

Returns the type of an object in this group, given the object's index.

Parameters:
idx - IN: Transient index of the object
Returns:
Object type
Exceptions:
H5::FileIException or H5::GroupIException

H5G_obj_t H5::CommonFG::getObjTypeByIdx hsize_t  idx,
H5std_string &  type_name
const
 

This is an overloaded member function, provided for convenience. It differs from the above function because it also provides the returned object type in text.

Parameters:
idx - IN: Transient index of the object
type_name - IN: Object type in text
Returns:
Object type
Exceptions:
H5::FileIException or H5::GroupIException

int H5::CommonFG::iterateElems const char *  name,
int *  idx,
H5G_iterate_t  op,
void *  op_data
 

Iterates a user's function over the entries of a group.

Parameters:
name - IN : Name of group to iterate over
idx - IN/OUT: Starting (IN) and ending (OUT) entry indices
op - IN : User's function to operate on each entry
op_data - IN/OUT: Data associated with the operation
Returns:
The return value of the first operator that returns non-zero, or zero if all members were processed with no operator returning non-zero.
Exceptions:
H5::FileIException or H5::GroupIException

int H5::CommonFG::iterateElems const H5std_string &  name,
int *  idx,
H5G_iterate_t  op,
void *  op_data
 

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

void H5::CommonFG::link H5G_link_t  link_type,
const char *  curr_name,
const char *  new_name
const
 

Creates a link of the specified type from new_name to curr_name.

Parameters:
link_type - IN: Link type; possible values are
  • H5G_LINK_HARD
  • H5G_LINK_SOFT
curr_name - IN: Name of the existing object if link is a hard link; can be anything for the soft link
new_name - IN: New name for the object
Exceptions:
H5::FileIException or H5::GroupIException
Description
Note that both names are interpreted relative to the specified location.

void H5::CommonFG::link H5G_link_t  link_type,
const H5std_string &  curr_name,
const H5std_string &  new_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 curr_name and new_name.

void H5::CommonFG::unlink const char *  name  )  const
 

Removes the specified name at this location.

Parameters:
name - IN: Name of the object to be removed
Exceptions:
H5::FileIException or H5::GroupIException

void H5::CommonFG::unlink const H5std_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.

void H5::CommonFG::mount const char *  name,
H5File child,
PropList plist
const
 

Mounts the file child onto this group.

Parameters:
name - IN: Name of the group
child - IN: File to mount
plist - IN: Property list to use
Exceptions:
H5::FileIException or H5::GroupIException

void H5::CommonFG::mount const H5std_string &  name,
H5File child,
PropList plist
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.

void H5::CommonFG::unmount const char *  name  )  const
 

Unmounts the specified file.

Parameters:
name - IN: Name of the file to unmount
Exceptions:
H5::FileIException or H5::GroupIException

void H5::CommonFG::unmount const H5std_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.

void H5::CommonFG::move const char *  src,
const char *  dst
const
 

Renames an object at this location.

Parameters:
src - IN: Object's original name
dst - IN: Object's new name
Exceptions:
H5::FileIException or H5::GroupIException
Note:
Exercise care in moving groups as it is possible to render data in a file inaccessible with Group::move. Please refer to the Group Interface in the HDF5 User's Guide at: ../Groups.html

void H5::CommonFG::move const H5std_string &  src,
const H5std_string &  dst
const
 

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

DataType H5::CommonFG::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

DataType H5::CommonFG::openDataType const H5std_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.

ArrayType H5::CommonFG::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

ArrayType H5::CommonFG::openArrayType const H5std_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 H5::CommonFG::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

CompType H5::CommonFG::openCompType const H5std_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 H5::CommonFG::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

EnumType H5::CommonFG::openEnumType const H5std_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 H5::CommonFG::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

IntType H5::CommonFG::openIntType const H5std_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 H5::CommonFG::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

FloatType H5::CommonFG::openFloatType const H5std_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 H5::CommonFG::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

StrType H5::CommonFG::openStrType const H5std_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 H5::CommonFG::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

VarLenType H5::CommonFG::openVarLenType const H5std_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 H5::CommonFG::throwException const H5std_string &  func_name,
const H5std_string &  msg
const [pure virtual]
 

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

Implemented in H5::H5File, and H5::Group.


Generated on Tue Aug 14 13:56:59 2007 by  doxygen 1.3.9.1