summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Location.h
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2013-09-23 00:39:44 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2013-09-23 00:39:44 (GMT)
commitf8fb310610ca222ca44fabf4311e3af24d660b9d (patch)
tree82f9bd3dd2390345711158fc3d70f9f4202d9073 /c++/src/H5Location.h
parentf9a758f442bcbf7f09ef5b1699dd6e187f059ee2 (diff)
downloadhdf5-f8fb310610ca222ca44fabf4311e3af24d660b9d.zip
hdf5-f8fb310610ca222ca44fabf4311e3af24d660b9d.tar.gz
hdf5-f8fb310610ca222ca44fabf4311e3af24d660b9d.tar.bz2
[svn-r24188] Purpose: Fixed bug introduced in r24163
Description: - The failure in daily test was caused by missing initialization of member "id" in a few constructors. This is now fixed. - Added two overloaded H5Location::setComment - Improved some error reporting in H5Location - Improved error reporting in tests Platforms tested: Linux/32 2.6 (jam) SunOS 5.11 (emu) Linux/64 2.6 (koala)/PGI compilers
Diffstat (limited to 'c++/src/H5Location.h')
-rw-r--r--c++/src/H5Location.h53
1 files changed, 35 insertions, 18 deletions
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index 1f54439..50278db 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -36,12 +36,12 @@ typedef void (*attr_operator_t)( H5Location& loc/*in*/,
class UserData4Aiterate { // user data for attribute iteration
public:
- attr_operator_t op;
- void* opData;
- H5Location* location;
+ attr_operator_t op;
+ void* opData;
+ H5Location* location;
};
-// An H5Location can be a file, group, dataset, named datatype, or attribute.
+// An H5Location can be a file, group, dataset, or committed datatype.
class H5_DLLCPP H5Location : public IdComponent {
public:
@@ -85,29 +85,49 @@ class H5_DLLCPP H5Location : public IdComponent {
bool attrExists(const char* name) const;
bool attrExists(const H5std_string& name) const;
+ // Renames the named attribute to a new name.
+ void renameAttr(const char* oldname, const char* newname) const;
+ void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
+
// Removes the named attribute from this location.
void removeAttr(const char* name) const;
void removeAttr(const H5std_string& name) const;
- // Renames the named attribute to a new name.
- void renameAttr(const char* oldname, const char* newname) const;
- void renameAttr(const H5std_string& oldname, const H5std_string& newname) const;
+ // Sets the comment for an HDF5 object specified by its name.
+ void setComment(const char* name, const char* comment) const;
+ void setComment(const H5std_string& name, const H5std_string& comment) const;
+ void setComment(const char* comment) const;
+ void setComment(const H5std_string& comment) const;
+
+ // Retrieves comment for the HDF5 object specified by its name.
+ H5std_string getComment(const char* name, size_t bufsize=256) const;
+ H5std_string getComment(const H5std_string& name, size_t bufsize=256) const;
+
+ // Removes the comment for the HDF5 object specified by its name.
+ void removeComment(const char* name) const;
+ void removeComment(const H5std_string& name) const;
// Creates a reference to a named object or to a dataset region
// in this object.
+ void reference(void* ref, const char* name,
+ H5R_type_t ref_type = H5R_OBJECT) const;
+ void reference(void* ref, const H5std_string& name,
+ H5R_type_t ref_type = H5R_DATASET_REGION) const;
void reference(void* ref, const char* name, const DataSpace& dataspace,
H5R_type_t ref_type = H5R_DATASET_REGION) const;
- void reference(void* ref, const char* name) const;
- void reference(void* ref, const H5std_string& name) const;
+ void reference(void* ref, const H5std_string& name, const DataSpace& dataspace,
+ H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Open a referenced object whose location is specified by either
// a file, an HDF5 object, or an attribute.
- void dereference(H5File& h5file, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
- void dereference(H5Object& obj, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
- void dereference(Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT);
+ void dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
+ void dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
- ///\brief Returns an identifier. (pure virtual)
- virtual hid_t getId() const = 0;
+ // Retrieves a dataspace with the region pointed to selected.
+ DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
+
+ ///\brief Returns an identifier. (pure virtual)
+ virtual hid_t getId() const = 0;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -124,7 +144,7 @@ class H5_DLLCPP H5Location : public IdComponent {
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
// Dereferences a ref into an HDF5 id.
- hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type);
+ hid_t p_dereference(hid_t loc_id, const void* ref, H5R_type_t ref_type, const PropList& plist, const char* from_func);
#ifndef H5_NO_DEPRECATED_SYMBOLS
// Retrieves the type of object that an object reference points to.
@@ -134,9 +154,6 @@ class H5_DLLCPP H5Location : public IdComponent {
// Retrieves the type of object that an object reference points to.
H5O_type_t p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const;
- // Retrieves a dataspace with the region pointed to selected.
- hid_t p_get_region(void *ref, H5R_type_t ref_type) const;
-
// Noop destructor.
virtual ~H5Location();