diff options
author | lrknox <lrknox> | 2017-03-17 22:25:01 (GMT) |
---|---|---|
committer | lrknox <lrknox> | 2017-03-17 22:25:01 (GMT) |
commit | 80c54411a5948bfc04e34dee05364519aca8769d (patch) | |
tree | 431db9575cab05d9840acd1f82bc1ffd481b3c33 | |
parent | 42141478f275676e7d6c940d821d21bd89c451db (diff) | |
parent | c89e53431bff1fd584aabbe6d326df7d69361219 (diff) | |
download | hdf5-80c54411a5948bfc04e34dee05364519aca8769d.zip hdf5-80c54411a5948bfc04e34dee05364519aca8769d.tar.gz hdf5-80c54411a5948bfc04e34dee05364519aca8769d.tar.bz2 |
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into develop
-rw-r--r-- | c++/src/H5PropList.cpp | 61 | ||||
-rw-r--r-- | c++/src/H5PropList.h | 7 |
2 files changed, 66 insertions, 2 deletions
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index c4176c2..0df0a9f 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -565,8 +565,27 @@ size_t PropList::getNumProps() const ///\param name - IN: Name of property to set - \c char pointer ///\param value - IN: Void pointer to the value for the property ///\exception H5::PropListIException +// Description +// Revision svn r29815 changed 'value' to const, hence, deprecated +// the non-const setProperty. // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- +void PropList::setProperty(const char* name, const void* value) const +{ + herr_t ret_value = H5Pset(id, name, value); + if (ret_value < 0) + { + throw PropListIException(inMemFunc("setProperty"), "H5Pset failed"); + } +} + +//-------------------------------------------------------------------------- +// Function: PropList::setProperty +///\brief Deprecated due to missing const in prototype. (1.10.1) +// Programmer: Binh-Minh Ribler - March, 2017 +// Modification +// Planned for removal. -BMR, 2017/03/17 1.10.1 +//-------------------------------------------------------------------------- void PropList::setProperty(const char* name, void* value) const { herr_t ret_value = H5Pset(id, name, value); @@ -575,6 +594,7 @@ void PropList::setProperty(const char* name, void* value) const throw PropListIException(inMemFunc("setProperty"), "H5Pset failed"); } } + //-------------------------------------------------------------------------- // Function: PropList::setProperty ///\brief This is an overloaded member function, provided for convenience. @@ -582,11 +602,14 @@ void PropList::setProperty(const char* name, void* value) const /// accepts. ///\param name - IN: Name of property to set - \c char pointer ///\param charptr - IN: Char pointer to the value for the property +// Description +// Revision svn r29815 changed 'value' to const, hence, deprecated +// the non-const setProperty. // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- void PropList::setProperty(const char* name, const char* charptr) const { - herr_t ret_value = H5Pset(id, name, (void*)charptr); + herr_t ret_value = H5Pset(id, name, (const void*)charptr); if (ret_value < 0) { throw PropListIException(inMemFunc("setProperty"), "H5Pset failed"); @@ -601,6 +624,18 @@ void PropList::setProperty(const char* name, const char* charptr) const ///\param strg - IN: Value for the property is a \c H5std_string // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- +void PropList::setProperty(const char* name, const H5std_string& strg) const +{ + setProperty(name, strg.c_str()); +} + +//-------------------------------------------------------------------------- +// Function: PropList::setProperty +///\brief Deprecated due to missing const in prototype. (1.10.1) +// Programmer: Binh-Minh Ribler - March, 2017 +// Modification +// Planned for removal. -BMR, 2017/03/17 1.10.1 +//-------------------------------------------------------------------------- void PropList::setProperty(const char* name, H5std_string& strg) const { setProperty(name, strg.c_str()); @@ -615,6 +650,18 @@ void PropList::setProperty(const char* name, H5std_string& strg) const ///\param value - IN: Void pointer to the value for the property // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- +void PropList::setProperty(const H5std_string& name, const void* value) const +{ + setProperty(name.c_str(), value); +} + +//-------------------------------------------------------------------------- +// Function: PropList::setProperty +///\brief Deprecated due to missing const in prototype. (1.10.1) +// Programmer: Binh-Minh Ribler - March, 2017 +// Modification +// Planned for removal. -BMR, 2017/03/17 1.10.1 +//-------------------------------------------------------------------------- void PropList::setProperty(const H5std_string& name, void* value) const { setProperty(name.c_str(), value); @@ -629,6 +676,18 @@ void PropList::setProperty(const H5std_string& name, void* value) const ///\param strg - IN: Value for the property is a \c H5std_string // Programmer: Binh-Minh Ribler - April, 2004 //-------------------------------------------------------------------------- +void PropList::setProperty(const H5std_string& name, const H5std_string& strg) const +{ + setProperty(name.c_str(), strg.c_str()); +} + +//-------------------------------------------------------------------------- +// Function: PropList::setProperty +///\brief Deprecated due to missing const in prototype. (1.10.1) +// Programmer: Binh-Minh Ribler - March, 2017 +// Modification +// Planned for removal. -BMR, 2017/03/17 1.10.1 +//-------------------------------------------------------------------------- void PropList::setProperty(const H5std_string& name, H5std_string& strg) const { setProperty(name.c_str(), strg.c_str()); diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index 0ceaabd..772e96c 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -78,8 +78,13 @@ class H5_DLLCPP PropList : public IdComponent { H5std_string getProperty(const H5std_string& name) const; // Set a property's value in a property list. - void setProperty(const char* name, void* value) const; void setProperty(const char* name, const char* charptr) const; + void setProperty(const char* name, const void* value) const; + void setProperty(const char* name, const H5std_string& strg) const; + void setProperty(const H5std_string& name, const void* value) const; + void setProperty(const H5std_string& name, const H5std_string& strg) const; + // Deprecated after 1.10.1, missing const + void setProperty(const char* name, void* value) const; void setProperty(const char* name, H5std_string& strg) const; void setProperty(const H5std_string& name, void* value) const; void setProperty(const H5std_string& name, H5std_string& strg) const; |