H5Location is an abstract base class, providing a collection of wrappers of the C functions that take a location identifier, which can be either file, group, dataset, attribute, or named datatype.
#include <H5Location.h>
Public Member Functions | |||
bool | nameExists (const char *name, const LinkAccPropList &lapl=LinkAccPropList::DEFAULT) const | ||
Checks if a link of a given name exists in a location. More... | |||
bool | nameExists (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... | |||
void | getObjectInfo (H5O_info_t *oinfo) const | ||
Retrieve information about an object, specified by location.
| |||
void | getObjectInfo (const char *name, H5O_info_t *oinfo, const LinkAccPropList &lapl=LinkAccPropList::DEFAULT) const | ||
Retrieve information about an object, specified by name.
| |||
void | getObjectInfo (const H5std_string &name, H5O_info_t *oinfo, const LinkAccPropList &lapl=LinkAccPropList::DEFAULT) const | ||
Retrieve information about an object, specified by name.
| |||
int | getNumAttrs () const | ||
Deprecated - replaced by H5Object::getNumAttrs() 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... | |||
unsigned | objVersion () const | ||
Returns the header version of this HDF5 object. 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) | ||
Dereferences a reference into an HDF5 object, given an HDF5 object. More... | |||
void | dereference (const Attribute &attr, const void *ref, H5R_type_t ref_type=H5R_OBJECT) | ||
Dereferences a reference into an HDF5 object, given an attribute. More... | |||
DataSpace | getRegion (void *ref, H5R_type_t ref_type=H5R_DATASET_REGION) const | ||
Retrieves a dataspace with the region pointed to selected. More... | |||
hid_t | openObjId (const char *name, const LinkAccPropList &lapl=LinkAccPropList::DEFAULT) const | ||
Opens an object without knowing the object type. More... | |||
hid_t | openObjId (const H5std_string &name, const LinkAccPropList &lapl=LinkAccPropList::DEFAULT) const | ||
This is an overloaded member function, provided for convenience. It takes a reference to a H5std_string for the object's path. More... | |||
void | closeObjId (hid_t obj_id) const | ||
Closes an object, which was opened with H5Location::openObjId. More... | |||
virtual hid_t | getId () const =0 | ||
Returns an identifier. (pure virtual) More... | |||
virtual Attribute | createAttribute (const char *name, const DataType &type, const DataSpace &space, const PropList &create_plist=PropList::DEFAULT) const | ||
Deprecated - replaced by H5Object::createAttribute. More... | |||
virtual Attribute | createAttribute (const H5std_string &name, const DataType &type, const DataSpace &space, const PropList &create_plist=PropList::DEFAULT) const | ||
Deprecated - replaced by H5Object::createAttribute. More... | |||
virtual Attribute | openAttribute (const char *name) const | ||
Deprecated - replaced by H5Object::openAttribute. More... | |||
virtual Attribute | openAttribute (const H5std_string &name) const | ||
Deprecated - replaced by H5Object::openAttribute. More... | |||
virtual Attribute | openAttribute (const unsigned int idx) const | ||
Deprecated - replaced by H5Object::openAttribute. More... | |||
virtual 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. More... | |||
virtual bool | attrExists (const char *name) const | ||
Deprecated - replaced by H5Object::attrExists() More... | |||
virtual bool | attrExists (const H5std_string &name) const | ||
Deprecated - replaced by H5Object::attrExists() More... | |||
virtual void | renameAttr (const char *oldname, const char *newname) const | ||
Deprecated - replaced by H5Object::renameAttr() More... | |||
virtual void | renameAttr (const H5std_string &oldname, const H5std_string &newname) const | ||
Deprecated - replaced by H5Object::renameAttr() More... | |||
virtual void | removeAttr (const char *name) const | ||
Deprecated - replaced by H5Object::removeAttr() More... | |||
virtual void | removeAttr (const H5std_string &name) const | ||
Deprecated - replaced by H5Object::removeAttr() More... | |||
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... | |||
IdComponent & | operator= (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 () |
Noop destructor. More... | |
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 bool | isValid (hid_t an_id) |
Checks if the given ID is valid. More... | |
|
protectedvirtual |
|
virtual |
name | - IN: Name of the attribute to be queried |
H5::AttributeIException |
Reimplemented in H5::H5Object.
References getId().
Referenced by attrExists().
|
virtual |
name | - IN: Name of the attribute to be queried |
Reimplemented in H5::H5Object.
References attrExists().
void H5::H5Location::closeObjId | ( | hid_t | obj_id | ) | const |
H5::LocationException |
|
virtual |
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 |
H5::AttributeIException |
H5Location::removeAttr
, then recreate it with this function. Reimplemented in H5::H5Object.
References H5::f_Attribute_setId(), H5::PropList::getId(), H5::DataSpace::getId(), getId(), and H5::DataType::getId().
Referenced by createAttribute().
|
virtual |
It differs from the above function in that it takes a reference to an H5std_string
for name.
Reimplemented in H5::H5Object.
References createAttribute().
void H5::H5Location::dereference | ( | const H5Location & | loc, |
const void * | ref, | ||
H5R_type_t | ref_type = H5R_OBJECT |
||
) |
loc | - IN: Location of the referenced object |
ref | - IN: Reference pointer |
ref_type | - IN: Reference type |
H5::ReferenceException |
References getId().
void H5::H5Location::dereference | ( | const Attribute & | attr, |
const void * | ref, | ||
H5R_type_t | ref_type = H5R_OBJECT |
||
) |
attr | - IN: Attribute specifying the location of the referenced object |
ref | - IN: Reference pointer |
ref_type | - IN: Reference type |
H5::ReferenceException |
References H5::Attribute::getId().
void H5::H5Location::flush | ( | H5F_scope_t | scope | ) | const |
scope | - IN: Specifies the scope of the flushing action, which can be either of these values:
|
H5::LocationException |
References getId().
ssize_t H5::H5Location::getComment | ( | const char * | name, |
size_t | buf_size, | ||
char * | comment | ||
) | const |
name | - IN: Name of the object |
buf_size | - IN: Length of the comment to retrieve |
comment | - OUT: Retrieved comment |
H5::LocationException |
References getId().
Referenced by getComment().
H5std_string H5::H5Location::getComment | ( | const char * | name, |
size_t | buf_size = 0 |
||
) | const |
name | - IN: Name of the object |
buf_size | - IN: Length of the comment to retrieve, default to 0 |
H5::LocationException |
References getComment(), and getId().
H5std_string H5::H5Location::getComment | ( | const H5std_string & | name, |
size_t | buf_size = 0 |
||
) | const |
References getComment().
H5std_string H5::H5Location::getFileName | ( | ) | const |
|
pure virtual |
Implemented in H5::DataType, H5::H5File, H5::DataSet, H5::Attribute, and H5::Group.
Referenced by attrExists(), H5::DataType::commit(), createAttribute(), H5::DataSet::DataSet(), H5::DataType::DataType(), dereference(), flush(), getComment(), getNumAttrs(), getObjectInfo(), getRegion(), H5::Group::Group(), iterateAttrs(), nameExists(), objVersion(), openAttribute(), openObjId(), removeAttr(), removeComment(), renameAttr(), and setComment().
int H5::H5Location::getNumAttrs | ( | ) | const |
void H5::H5Location::getObjectInfo | ( | H5O_info_t * | oinfo | ) | const |
References getId().
void H5::H5Location::getObjectInfo | ( | const char * | name, |
H5O_info_t * | oinfo, | ||
const LinkAccPropList & | lapl = LinkAccPropList::DEFAULT |
||
) | const |
References H5::PropList::getId(), and getId().
void H5::H5Location::getObjectInfo | ( | const H5std_string & | name, |
H5O_info_t * | oinfo, | ||
const LinkAccPropList & | lapl = LinkAccPropList::DEFAULT |
||
) | const |
References H5::PropList::getId(), and getId().
H5G_obj_t H5::H5Location::getObjType | ( | void * | ref, |
H5R_type_t | ref_type = H5R_OBJECT |
||
) | const |
ref_type | - IN: Type of reference to query, valid values are:
|
ref | - IN: Reference to query |
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. H5::ReferenceException |
References H5::Exception::getDetailMsg().
H5O_type_t H5::H5Location::getRefObjType | ( | void * | ref, |
H5R_type_t | ref_type = H5R_OBJECT |
||
) | const |
ref | - IN: Reference to query |
ref_type | - IN: Type of reference to query, valid values are:
|
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 H5::ReferenceException |
References H5::Exception::getDetailMsg().
DataSpace H5::H5Location::getRegion | ( | void * | ref, |
H5R_type_t | ref_type = H5R_DATASET_REGION |
||
) | const |
ref | - IN: Reference to get region of |
ref_type | - IN: Type of reference to get region of - default |
H5::ReferenceException |
References H5::f_DataSpace_setId(), H5::Exception::getDetailMsg(), and getId().
|
virtual |
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 |
H5::AttributeIException |
References getId(), H5::UserData4Aiterate::location, H5::UserData4Aiterate::op, and H5::UserData4Aiterate::opData.
bool H5::H5Location::nameExists | ( | const char * | name, |
const LinkAccPropList & | lapl = LinkAccPropList::DEFAULT |
||
) | const |
name | - IN: Searched name - char* |
lapl | - IN: Link access property list |
H5::LocationException |
References H5::PropList::getId(), and getId().
Referenced by nameExists().
bool H5::H5Location::nameExists | ( | const H5std_string & | name, |
const LinkAccPropList & | lapl = LinkAccPropList::DEFAULT |
||
) | const |
name | - IN: Searched name - H5std_string |
lapl | - IN: Link access property list |
H5::LocationException |
References nameExists().
unsigned H5::H5Location::objVersion | ( | ) | const |
H5O_VERSION_1
H5O_VERSION_2
H5::LocationException | Exception will be thrown when:
|
References getId().
|
virtual |
name | - IN: Name of the attribute |
H5::AttributeIException |
Reimplemented in H5::H5Object.
References H5::f_Attribute_setId(), and getId().
Referenced by openAttribute().
|
virtual |
name | - IN: Name of the attribute |
Reimplemented in H5::H5Object.
References openAttribute().
|
virtual |
idx | - IN: Index of the attribute, a 0-based, non-negative integer |
H5::AttributeIException |
Reimplemented in H5::H5Object.
References H5::f_Attribute_setId(), and getId().
hid_t H5::H5Location::openObjId | ( | const char * | obj_name, |
const LinkAccPropList & | lapl = LinkAccPropList::DEFAULT |
||
) | const |
obj_name | - IN: Path to the object |
lapl | - IN: Access property list for the link pointing to the object |
H5::LocationException |
References H5::PropList::getId(), and getId().
Referenced by openObjId().
hid_t H5::H5Location::openObjId | ( | const H5std_string & | obj_name, |
const LinkAccPropList & | lapl = LinkAccPropList::DEFAULT |
||
) | const |
obj_name | - IN: Path to the object |
lapl | - IN: Access property list for the link pointing to the object |
H5::LocationException |
References openObjId().
void H5::H5Location::reference | ( | void * | ref, |
const char * | name, | ||
H5R_type_t | ref_type = H5R_OBJECT |
||
) | const |
ref | - IN: Reference pointer |
name | - IN: Name of the object to be referenced |
ref_type | - IN: Type of reference to query, valid values are:
|
H5::ReferenceException |
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 |
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:
|
References reference().
void H5::H5Location::reference | ( | void * | ref, |
const char * | name, | ||
const DataSpace & | dataspace, | ||
H5R_type_t | ref_type = H5R_DATASET_REGION |
||
) | const |
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:
|
H5::ReferenceException |
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 |
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:
|
H5::ReferenceException |
References H5::Exception::getDetailMsg(), and H5::DataSpace::getId().
|
virtual |
name | - IN: Name of the attribute to be removed |
H5::AttributeIException |
Reimplemented in H5::H5Object.
References getId().
Referenced by removeAttr().
|
virtual |
name | - IN: Name of the attribute to be removed |
Reimplemented in H5::H5Object.
References removeAttr().
void H5::H5Location::removeComment | ( | const char * | name | ) | const |
name | - IN: Name of the object |
H5::LocationException |
References getId().
Referenced by removeComment().
void H5::H5Location::removeComment | ( | const H5std_string & | name | ) | const |
References removeComment().
|
virtual |
oldname | - IN: Name of the attribute to be renamed |
newname | - IN: New name ame of the attribute |
H5::AttributeIException |
Reimplemented in H5::H5Object.
References getId().
Referenced by renameAttr().
|
virtual |
oldname | - IN: Name of the attribute to be renamed |
newname | - IN: New name ame of the attribute |
H5::AttributeIException |
Reimplemented in H5::H5Object.
References renameAttr().
void H5::H5Location::setComment | ( | const char * | name, |
const char * | comment | ||
) | const |
name | - IN: Name of the object |
comment | - IN: New comment |
H5::LocationException |
References getId().
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 |
References getId().
void H5::H5Location::setComment | ( | const H5std_string & | comment | ) | const |
References setComment().
The HDF Group Help Desk: |
Copyright by
The HDF Group
and the Board of Trustees of the University of Illinois |