summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Location.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-12-04 18:21:12 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-12-04 18:21:12 (GMT)
commite33d677636b860f8f6b95c0ee3736395541a2610 (patch)
treed70dd01c6e75aa27ef6d286c553de06625aa0b8d /c++/src/H5Location.cpp
parentf116545ce465181928ca97214b9cfa87092a3ee9 (diff)
downloadhdf5-e33d677636b860f8f6b95c0ee3736395541a2610.zip
hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.gz
hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.bz2
Various code cleanup
Description: - Replaced H5Location::exists with H5Location::nameExists and marked H5Location::exists as deprecated. - Miscellaneous test cleanup for consistency. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5Location.cpp')
-rw-r--r--c++/src/H5Location.cpp44
1 files changed, 38 insertions, 6 deletions
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index a00e181..d0b5f9d 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -76,15 +76,15 @@ H5Location::H5Location() : IdComponent() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
-// Function: H5Location::exists
+// Function: H5Location::nameExists
///\brief Checks if a link of a given name exists in a location
///\param name - IN: Searched name
///\param lapl - IN: Link access property list
///\exception H5::LocationException
-// Programmer Binh-Minh Ribler - Nov, 2016
// Modification
+// Renamed from exists() in 1.10.2 -BMR
//--------------------------------------------------------------------------
-bool H5Location::exists(const char* name, const LinkAccPropList& lapl) const
+bool H5Location::nameExists(const char* name, const LinkAccPropList& lapl) const
{
htri_t ret_value = H5Lexists(getId(), name, lapl.getId());
if (ret_value > 0)
@@ -93,22 +93,54 @@ bool H5Location::exists(const char* name, const LinkAccPropList& lapl) const
return false;
else // Raise exception when H5Lexists returns a negative value
{
- throw LocationException(inMemFunc("exists"), "H5Lexists failed");
+ throw LocationException(inMemFunc("nameExists"), "H5Lexists failed");
}
}
//--------------------------------------------------------------------------
-// Function: H5Location::exists
+// Function: H5Location::nameExists
///\brief Checks if a link of a given name exists in a location
///\param name - IN: Searched name
///\param lapl - IN: Link access property list
///\exception H5::LocationException
+// Modification
+// Renamed from exists() in 1.10.2 -BMR
+//--------------------------------------------------------------------------
+bool H5Location::nameExists(const H5std_string& name, const LinkAccPropList& lapl) const
+{
+ return(nameExists(name.c_str(), lapl));
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::exists - Deprecated
+// Purpose Checks if a link of a given name exists in a location
+///\brief Deprecated in favor of nameExists
+///\param name - IN: Searched name
+///\param lapl - IN: Link access property list
+///\exception H5::LocationException
+// Programmer Binh-Minh Ribler - Nov, 2016
+// Modification
+// Renamed to nameExists() in 1.10.2 -BMR
+//--------------------------------------------------------------------------
+bool H5Location::exists(const char* name, const LinkAccPropList& lapl) const
+{
+ return(nameExists(name, lapl));
+}
+
+//--------------------------------------------------------------------------
+// Function: H5Location::exists - Deprecated
+// Purpose Checks if a link of a given name exists in a location
+///\brief Deprecated in favor of nameExists
+///\param name - IN: Searched name
+///\param lapl - IN: Link access property list
+///\exception H5::LocationException
// Programmer Binh-Minh Ribler - Dec, 2016
// Modification
+// Renamed to nameExists() in 1.10.2 -BMR
//--------------------------------------------------------------------------
bool H5Location::exists(const H5std_string& name, const LinkAccPropList& lapl) const
{
- return(exists(name.c_str(), lapl));
+ return(nameExists(name.c_str(), lapl));
}
//--------------------------------------------------------------------------