HDF5 C++ API  1.10.1
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Protected Member Functions | List of all members
H5::H5Location Class Reference

H5Location is an abstract base class, added in version 1.8.12. More...

#include <H5Location.h>

Inheritance diagram for H5::H5Location:
H5::IdComponent H5::Attribute H5::H5Object H5::DataSet H5::DataType H5::Group H5::ArrayType H5::AtomType H5::CompType H5::EnumType H5::VarLenType H5::H5File H5::FloatType H5::IntType H5::PredType H5::StrType

Public Member Functions

bool exists (const char *name, const LinkAccPropList &lapl=LinkAccPropList::DEFAULT) const
 Checks if a link of a given name exists in a location. More...
 
bool exists (const H5std_string &name, const LinkAccPropList &lapl=LinkAccPropList::DEFAULT) const
 Checks if a link of a given name exists in a location. More...
 
void flush (H5F_scope_t scope) const
 Flushes all buffers associated with a location to disk. More...
 
H5std_string getFileName () const
 Gets the name of the file, in which this HDF5 object belongs. More...
 
H5G_obj_t getObjType (void *ref, H5R_type_t ref_type=H5R_OBJECT) const
 Retrieves the type of object that an object reference points to. More...
 
H5O_type_t getRefObjType (void *ref, H5R_type_t ref_type=H5R_OBJECT) const
 Retrieves the type of object that an object reference points to. More...
 
void setComment (const char *name, const char *comment) const
 Sets or resets the comment for an object specified by its name. More...
 
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. More...
 
void setComment (const char *comment) const
 This is an overloaded member function, provided for convenience. It differs from the above function in that it doesn't take an object name. More...
 
void setComment (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 comment. More...
 
ssize_t getComment (const char *name, size_t buf_size, char *comment) const
 Retrieves the comment for this location, returning its length. More...
 
H5std_string getComment (const char *name, size_t buf_size=0) const
 Returns the comment as string for this location, returning its length. More...
 
H5std_string getComment (const H5std_string &name, size_t buf_size=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. More...
 
void removeComment (const char *name) const
 Removes the comment from an object specified by its name. More...
 
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. More...
 
void reference (void *ref, const char *name, H5R_type_t ref_type=H5R_OBJECT) const
 This is an overloaded function, provided for your convenience. It differs from the above function in that it does not take a DataSpace object and the reference type must be specified. More...
 
void reference (void *ref, const H5std_string &name, H5R_type_t ref_type=H5R_OBJECT) 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. More...
 
void 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. More...
 
void reference (void *ref, const H5std_string &name, const DataSpace &dataspace, H5R_type_t ref_type=H5R_DATASET_REGION) 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. More...
 
void dereference (const H5Location &loc, const void *ref, H5R_type_t ref_type=H5R_OBJECT, const PropList &plist=PropList::DEFAULT)
 Dereferences a reference into an HDF5 object, given an HDF5 object. More...
 
DataSpace getRegion (void *ref, H5R_type_t ref_type=H5R_DATASET_REGION) const
 Retrieves a dataspace with the region pointed to selected. More...
 
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. More...
 
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. More...
 
Group openGroup (const char *name) const
 Opens an existing group in a location which can be a file or another group. More...
 
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. More...
 
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. More...
 
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. More...
 
DataSet openDataSet (const char *name) const
 Opens an existing dataset at this location. More...
 
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. More...
 
H5std_string getLinkval (const char *link_name, size_t size=0) const
 Returns the name of the object that the symbolic link points to. More...
 
H5std_string getLinkval (const H5std_string &link_name, size_t size=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. More...
 
int getNumAttrs () const
 Returns the number of attributes attached to this HDF5 object. More...
 
H5std_string getObjnameByIdx (hsize_t idx) const
 Returns the name of an object in this group, given the object's index. More...
 
ssize_t getObjnameByIdx (hsize_t idx, char *name, size_t size) const
 Retrieves the name of an object in this group, given the object's index. More...
 
ssize_t getObjnameByIdx (hsize_t idx, 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. More...
 
H5O_type_t childObjType (const H5std_string &objname) const
 This is an overloaded member function, provided for convenience. It takes an H5std_string for the object's name. More...
 
H5O_type_t childObjType (const char *objname) const
 Returns the type of an object in this file/group, given the object's name. More...
 
H5O_type_t childObjType (hsize_t index, H5_index_t index_type=H5_INDEX_NAME, H5_iter_order_t order=H5_ITER_INC, const char *objname=".") const
 Returns the type of an object in this file/group, given the object's index and its type and order. More...
 
unsigned childObjVersion (const char *objname) const
 Returns the object header version of an object in this file/group, given the object's name. More...
 
unsigned childObjVersion (const H5std_string &objname) const
 This is an overloaded member function, provided for convenience. It takes an H5std_string for the object's name. More...
 
H5G_obj_t getObjTypeByIdx (hsize_t idx) const
 Returns the type of an object in this group, given the object's index. More...
 
H5G_obj_t getObjTypeByIdx (hsize_t idx, char *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 (char*) More...
 
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 (H5std_string&) More...
 
void getObjinfo (const char *name, hbool_t follow_link, H5G_stat_t &statbuf) const
 Returns information about an object. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void link (H5L_type_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. More...
 
void link (H5L_type_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. More...
 
void unlink (const char *name) const
 Removes the specified name at this location. More...
 
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. More...
 
void mount (const char *name, const H5File &child, const PropList &plist) const
 Mounts the file child onto this group. More...
 
void mount (const H5std_string &name, const H5File &child, const PropList &plist) const
 This is an overloaded member function, provided for convenience. It takes an H5std_string for name. More...
 
void unmount (const char *name) const
 Unmounts the specified file. More...
 
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. More...
 
void move (const char *src, const char *dst) const
 Renames an object at this location. More...
 
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. More...
 
virtual void throwException (const H5std_string &func_name, const H5std_string &msg) const
 For subclasses, H5File and Group, to throw appropriate exception. More...
 
 H5Location ()
 
- Public Member Functions inherited from H5::IdComponent
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...
 

Protected Member Functions

virtual ~H5Location ()
 

Additional Inherited Members

- Static Public Member Functions inherited from H5::IdComponent
static H5I_type_t getHDFObjType (const hid_t obj_id)
 Given an id, returns the type of the object. More...
 
static hsize_t getNumMembers (H5I_type_t type)
 Returns the number of members of the given type. More...
 
static bool isValid (hid_t an_id)
 Checks if the given ID is valid. More...
 
static bool typeExists (H5I_type_t type)
 Queries if a given type is currently registered with the library. More...
 

Detailed Description

It provides a collection of wrappers for the C functions that take a location identifier to specify the HDF5 object. The location identifier can be either file, group, dataset, attribute, or named datatype. Wrappers for H5A functions stay in H5Object.

Constructor & Destructor Documentation

H5::H5Location::H5Location ( )
virtual H5::H5Location::~H5Location ( )
protectedvirtual

Member Function Documentation

H5O_type_t H5::H5Location::childObjType ( const H5std_string &  objname) const

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

Parameters
objname- IN: Name of the object (H5std_string&)
Exceptions
H5::FileIExceptionor H5::GroupIException
H5O_type_t H5::H5Location::childObjType ( const char *  objname) const
Parameters
objname- IN: Name of the object
Returns
Object type, which can have the following values for group, dataset, and named datatype
Exceptions
H5::FileIExceptionor H5::GroupIException Exception will be thrown when:
  • an error returned by the C API
  • object type is not one of the valid values above

References throwException().

H5O_type_t H5::H5Location::childObjType ( hsize_t  index,
H5_index_t  index_type = H5_INDEX_NAME,
H5_iter_order_t  order = H5_ITER_INC,
const char *  objname = "." 
) const
Parameters
index- IN: Position of the object
index_type- IN: Type of the index, default to H5_INDEX_NAME
order- IN: Traversing order, default to H5_ITER_INC
objname- IN: Name of the object, default to "."
Returns
Object type, which can have the following values for group, dataset, and named datatype
Exceptions
H5::FileIExceptionor H5::GroupIException Exception will be thrown when:
  • an error returned by the C API
  • object type is not one of the valid values above

References throwException().

unsigned H5::H5Location::childObjVersion ( const char *  objname) const
Parameters
objname- IN: Name of the object
Returns
Object version, which can have the following values:
  • H5O_VERSION_1
  • H5O_VERSION_2
Exceptions
H5::FileIExceptionor H5::GroupIException Exception will be thrown when:
  • an error returned by the C API
  • version number is not one of the valid values above

References throwException().

Referenced by childObjVersion().

unsigned H5::H5Location::childObjVersion ( const H5std_string &  objname) const

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

Parameters
objname- IN: Name of the object (H5std_string&)
Exceptions
H5::FileIExceptionor H5::GroupIException

References childObjVersion().

DataSet H5::H5Location::createDataSet ( const char *  name,
const DataType data_type,
const DataSpace data_space,
const DSetCreatPropList create_plist = DSetCreatPropList::DEFAULT 
) const
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::FileIExceptionor H5::GroupIException
Examples:
compound.cpp, create.cpp, extend_ds.cpp, h5group.cpp, and writedata.cpp.

References H5::PropList::getId(), H5::DataSpace::getId(), H5::DataType::getId(), and throwException().

Referenced by createDataSet().

DataSet H5::H5Location::createDataSet ( const H5std_string &  name,
const DataType data_type,
const DataSpace data_space,
const DSetCreatPropList create_plist = DSetCreatPropList::DEFAULT 
) const

References createDataSet().

Group H5::H5Location::createGroup ( const char *  name,
size_t  size_hint = 0 
) const
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::FileIExceptionor 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.
Examples:
h5group.cpp.

References throwException().

Referenced by createGroup().

Group H5::H5Location::createGroup ( const H5std_string &  name,
size_t  size_hint = 0 
) const

References createGroup().

void H5::H5Location::dereference ( const H5Location loc,
const void *  ref,
H5R_type_t  ref_type = H5R_OBJECT,
const PropList plist = PropList::DEFAULT 
)
Parameters
loc- IN: Location of the referenced object
ref- IN: Reference pointer
ref_type- IN: Reference type
plist- IN: Property list - default to PropList::DEFAULT
Exceptions
H5::ReferenceException
bool H5::H5Location::exists ( const char *  name,
const LinkAccPropList lapl = LinkAccPropList::DEFAULT 
) const
Parameters
name- IN: Searched name
lapl- IN: Link access property list
Exceptions
H5::LocationException

References H5::PropList::getId(), and throwException().

Referenced by exists().

bool H5::H5Location::exists ( const H5std_string &  name,
const LinkAccPropList lapl = LinkAccPropList::DEFAULT 
) const
Parameters
name- IN: Searched name
lapl- IN: Link access property list
Exceptions
H5::LocationException

References exists().

void H5::H5Location::flush ( H5F_scope_t  scope) const
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::Exception
Description
This location is used to identify the file to be flushed.
ssize_t H5::H5Location::getComment ( const char *  name,
size_t  buf_size,
char *  comment 
) const
Parameters
name- IN: Name of the object
buf_size- IN: Length of the comment to retrieve
comment- OUT: Retrieved comment
Returns
Actual length of the comment
Exceptions
H5::LocationException
Description
This function retrieves buf_size characters of the comment including the null terminator. Thus, if the actual length of the comment is more than buf_size-1, the retrieved comment will be truncated to accommodate the null terminator.

Referenced by getComment().

H5std_string H5::H5Location::getComment ( const char *  name,
size_t  buf_size = 0 
) const
Parameters
name- IN: Name of the object
buf_size- IN: Length of the comment to retrieve, default to 0
Returns
Comment string
Exceptions
H5::LocationException

References getComment().

H5std_string H5::H5Location::getComment ( const H5std_string &  name,
size_t  buf_size = 0 
) const

References getComment().

H5std_string H5::H5Location::getFileName ( ) const
Returns
File name
Exceptions
H5::LocationException

References H5::Exception::getDetailMsg().

H5std_string H5::H5Location::getLinkval ( const char *  name,
size_t  size = 0 
) const
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::FileIExceptionor H5::GroupIException

References throwException().

Referenced by getLinkval().

H5std_string H5::H5Location::getLinkval ( const H5std_string &  link_name,
size_t  size = 0 
) const

References getLinkval().

int H5::H5Location::getNumAttrs ( ) const
Returns
Number of attributes
Exceptions
H5::AttributeIException
void H5::H5Location::getObjinfo ( const char *  name,
hbool_t  follow_link,
H5G_stat_t &  statbuf 
) const
Parameters
name- IN: Name of the object
follow_link- IN: Link flag
statbuf- OUT: Buffer to return information about the object
Exceptions
H5::FileIExceptionor H5::GroupIException
Description
For more information, please refer to the C layer Reference Manual at: http://www.hdfgroup.org/HDF5/doc/RM/RM_H5G.html#Group-GetObjinfo

References throwException().

Referenced by getObjinfo().

void H5::H5Location::getObjinfo ( const H5std_string &  name,
hbool_t  follow_link,
H5G_stat_t &  statbuf 
) const

References getObjinfo().

void H5::H5Location::getObjinfo ( const char *  name,
H5G_stat_t &  statbuf 
) const

References throwException().

void H5::H5Location::getObjinfo ( const H5std_string &  name,
H5G_stat_t &  statbuf 
) const

References getObjinfo().

H5std_string H5::H5Location::getObjnameByIdx ( hsize_t  idx) const
Parameters
idx- IN: Transient index of the object
Returns
Object name
Exceptions
H5::FileIExceptionor 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 H5Location::getNumObjs. Note that this is a transient index; thus, an object may have a different index each time the group is opened.

References throwException().

Referenced by getObjnameByIdx().

ssize_t H5::H5Location::getObjnameByIdx ( hsize_t  idx,
char *  name,
size_t  size 
) const
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::FileIExceptionor 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 H5Location::getNumObjs. Note that this is a transient index; thus, an object may have a different index each time the group is opened.

References throwException().

ssize_t H5::H5Location::getObjnameByIdx ( hsize_t  idx,
H5std_string &  name,
size_t  size 
) const
H5G_obj_t H5::H5Location::getObjType ( void *  ref,
H5R_type_t  ref_type = H5R_OBJECT 
) const
Parameters
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.
ref- IN: Reference to query
Returns
An object type, which can be one of the following:
  • H5G_UNKNOWN - A failure occurs. (-1)
  • H5G_GROUP - Object is a group.
  • H5G_DATASET - Object is a dataset.
  • H5G_TYPE Object - is a named datatype
  • H5G_LINK - Object is a symbolic link.
  • H5G_UDLINK - Object is a user-defined link.
Exceptions
H5::ReferenceException

References H5::Exception::getDetailMsg().

H5G_obj_t H5::H5Location::getObjTypeByIdx ( hsize_t  idx) const
Parameters
idx- IN: Transient index of the object
Returns
Object type
Exceptions
H5::FileIExceptionor H5::GroupIException

References throwException().

Referenced by getObjTypeByIdx().

H5G_obj_t H5::H5Location::getObjTypeByIdx ( hsize_t  idx,
char *  type_name 
) const
Parameters
idx- IN: Transient index of the object
type_name- OUT: Object type in text
Returns
Object type
Exceptions
H5::FileIExceptionor H5::GroupIException

References getObjTypeByIdx().

H5G_obj_t H5::H5Location::getObjTypeByIdx ( hsize_t  idx,
H5std_string &  type_name 
) const
Parameters
idx- IN: Transient index of the object
type_name- OUT: Object type in text
Returns
Object type
Exceptions
H5::FileIExceptionor H5::GroupIException

References throwException().

H5O_type_t H5::H5Location::getRefObjType ( void *  ref,
H5R_type_t  ref_type = H5R_OBJECT 
) const
Parameters
ref- IN: Reference to query
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.
Returns
An object type, which can be one of the following:
  • H5O_TYPE_UNKNOWN - Unknown object type (-1)
  • H5O_TYPE_GROUP - Object is a group
  • H5O_TYPE_DATASET - Object is a dataset
  • H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
  • H5O_TYPE_NTYPES - Number of different object types
Exceptions
H5::ReferenceException

References H5::Exception::getDetailMsg().

DataSpace H5::H5Location::getRegion ( void *  ref,
H5R_type_t  ref_type = H5R_DATASET_REGION 
) const
Parameters
ref- IN: Reference to get region of
ref_type- IN: Type of reference to get region of - default
Returns
DataSpace object
Exceptions
H5::ReferenceException

References H5::Exception::getDetailMsg().

int H5::H5Location::iterateElems ( const char *  name,
int *  idx,
H5G_iterate_t  op,
void *  op_data 
)
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::FileIExceptionor H5::GroupIException

References throwException().

Referenced by iterateElems().

int H5::H5Location::iterateElems ( const H5std_string &  name,
int *  idx,
H5G_iterate_t  op,
void *  op_data 
)

References iterateElems().

void H5::H5Location::link ( H5L_type_t  link_type,
const char *  curr_name,
const char *  new_name 
) const
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::FileIExceptionor H5::GroupIException
Description
Note that both names are interpreted relative to the specified location. For information on creating hard link and soft link, please refer to the C layer Reference Manual at: http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-CreateHard and http://hdfgroup.org/HDF5/doc/RM/RM_H5L.html#Link-CreateSoft
Examples:
h5group.cpp.

References throwException().

Referenced by link().

void H5::H5Location::link ( H5L_type_t  link_type,
const H5std_string &  curr_name,
const H5std_string &  new_name 
) const

References link().

void H5::H5Location::mount ( const char *  name,
const H5File child,
const PropList plist 
) const
Parameters
name- IN: Name of the group
child- IN: File to mount
plist- IN: Property list to use
Exceptions
H5::FileIExceptionor H5::GroupIException

References H5::H5File::getId(), H5::PropList::getId(), and throwException().

Referenced by mount().

void H5::H5Location::mount ( const H5std_string &  name,
const H5File child,
const PropList plist 
) const

References mount().

void H5::H5Location::move ( const char *  src,
const char *  dst 
) const
Parameters
src- IN: Object's original name
dst- IN: Object's new name
Exceptions
H5::FileIExceptionor H5::GroupIException
Note
Exercise care in moving groups as it is possible to render data in a file inaccessible with H5Location::move. Please refer to the Group Interface in the HDF5 User's Guide for details at: https://www.hdfgroup.org/HDF5/doc/UG/HDF5_Users_Guide-Responsive%20HTML5/index.html#t=HDF5_Users_Guide%2FGroups%2FHDF5_Groups.htm

References throwException().

Referenced by move().

void H5::H5Location::move ( const H5std_string &  src,
const H5std_string &  dst 
) const

References move().

DataSet H5::H5Location::openDataSet ( const char *  name) const
Parameters
name- IN: Name of the dataset to open
Returns
DataSet instance
Exceptions
H5::FileIExceptionor H5::GroupIException
Examples:
chunks.cpp, compound.cpp, h5group.cpp, readdata.cpp, and writedata.cpp.

References throwException().

Referenced by openDataSet().

DataSet H5::H5Location::openDataSet ( const H5std_string &  name) const

References openDataSet().

Group H5::H5Location::openGroup ( const char *  name) const
Parameters
name- IN: Name of the group to open
Returns
Group instance
Exceptions
H5::FileIExceptionor H5::GroupIException
Examples:
h5group.cpp.

References throwException().

Referenced by openGroup().

Group H5::H5Location::openGroup ( const H5std_string &  name) const

References openGroup().

void H5::H5Location::reference ( void *  ref,
const char *  name,
H5R_type_t  ref_type = H5R_OBJECT 
) const
Parameters
ref- IN: Reference pointer
name- IN: Name of the object to be referenced
ref_type- IN: Type of reference to query, valid values are:
  • H5R_OBJECT - Reference is an object reference (default)
  • H5R_DATASET_REGION - Reference is a dataset region
Exceptions
H5::ReferenceException
Note
This method is more suitable for an object reference.

References H5::Exception::getDetailMsg().

Referenced by reference().

void H5::H5Location::reference ( void *  ref,
const H5std_string &  name,
H5R_type_t  ref_type = H5R_OBJECT 
) const
Parameters
ref- IN: Reference pointer
name- IN: Name of the object to be referenced - H5std_string
ref_type- IN: Type of reference to query, valid values are:
  • H5R_OBJECT - Reference is an object reference (default)
  • H5R_DATASET_REGION - Reference is a dataset region
Note
This method is more suitable for an object reference.

References reference().

void H5::H5Location::reference ( void *  ref,
const char *  name,
const DataSpace dataspace,
H5R_type_t  ref_type = H5R_DATASET_REGION 
) const
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. (default)
Exceptions
H5::ReferenceException
Note
This method is more suitable for a dataset region reference.

References H5::Exception::getDetailMsg(), and H5::DataSpace::getId().

void H5::H5Location::reference ( void *  ref,
const H5std_string &  name,
const DataSpace dataspace,
H5R_type_t  ref_type = H5R_DATASET_REGION 
) const
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. (default)
Exceptions
H5::ReferenceException
Note
This method is more suitable for a dataset region reference.

References H5::Exception::getDetailMsg(), and H5::DataSpace::getId().

void H5::H5Location::removeComment ( const char *  name) const
Parameters
name- IN: Name of the object
Exceptions
H5::LocationException

Referenced by removeComment().

void H5::H5Location::removeComment ( const H5std_string &  name) const

References removeComment().

void H5::H5Location::setComment ( const char *  name,
const char *  comment 
) const
Parameters
name- IN: Name of the object
comment- IN: New comment
Exceptions
H5::LocationException
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.

Referenced by setComment().

void H5::H5Location::setComment ( const H5std_string &  name,
const H5std_string &  comment 
) const

References setComment().

void H5::H5Location::setComment ( const char *  comment) const
void H5::H5Location::setComment ( const H5std_string &  comment) const

References setComment().

virtual void H5::H5Location::throwException ( const H5std_string &  func_name,
const H5std_string &  msg 
) const
virtual
void H5::H5Location::unlink ( const char *  name) const
Parameters
name- IN: Name of the object to be removed
Exceptions
H5::FileIExceptionor H5::GroupIException
Examples:
h5group.cpp.

References throwException().

Referenced by unlink().

void H5::H5Location::unlink ( const H5std_string &  name) const

References unlink().

void H5::H5Location::unmount ( const char *  name) const
Parameters
name- IN: Name of the file to unmount
Exceptions
H5::FileIExceptionor H5::GroupIException

References throwException().

Referenced by unmount().

void H5::H5Location::unmount ( const H5std_string &  name) const

References unmount().


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