diff options
Diffstat (limited to 'c++/src/H5Object.h')
-rw-r--r-- | c++/src/H5Object.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index fa9e8a9..b118bb8 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -37,6 +37,30 @@ namespace H5 { // Inheritance: H5Location -> IdComponent class H5_DLLCPP H5Object : public H5Location { public: + // Creates an attribute for the specified object + // PropList is currently not used, so always be default. + Attribute createAttribute(const char* name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const; + Attribute createAttribute(const H5std_string& name, const DataType& type, const DataSpace& space, const PropList& create_plist = PropList::DEFAULT) const; + + // Given its name, opens the attribute that belongs to this object. + Attribute openAttribute(const char* name) const; + Attribute openAttribute(const H5std_string& name) const; + + // Given its index, opens the attribute that belongs to this object. + Attribute openAttribute(const unsigned int idx) const; + + // Checks whether the named attribute exists for this object. + bool attrExists(const char* name) const; + bool attrExists(const H5std_string& name) const; + + // Renames the named attribute of this object 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 object. + void removeAttr(const char* name) const; + void removeAttr(const H5std_string& name) const; + // Gets the name of this HDF5 object, i.e., Group, DataSet, or // DataType. ssize_t getObjName(char *obj_name, size_t buf_size = 0) const; |