summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Library.cpp
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /c++/src/H5Library.cpp
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'c++/src/H5Library.cpp')
-rw-r--r--c++/src/H5Library.cpp87
1 files changed, 49 insertions, 38 deletions
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index fde5599..8b8d7ba 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -14,7 +14,7 @@
#include <string>
#include <cstdlib>
-#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
+#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -44,11 +44,11 @@ namespace H5 {
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::open()
+void
+H5Library::open()
{
herr_t ret_value = H5open();
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::open", "H5open failed");
}
}
@@ -60,11 +60,11 @@ void H5Library::open()
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::close()
+void
+H5Library::close()
{
herr_t ret_value = H5close();
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::close", "H5close failed");
}
}
@@ -79,9 +79,10 @@ void H5Library::close()
// Removed the check for failure returned from H5dont_atexit.
// will be fixed to not fail (HDFFV-9540)
//--------------------------------------------------------------------------
-void H5Library::dontAtExit()
+void
+H5Library::dontAtExit()
{
- (void)H5dont_atexit();
+ (void)H5dont_atexit();
}
//--------------------------------------------------------------------------
@@ -93,11 +94,11 @@ void H5Library::dontAtExit()
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::getLibVersion(unsigned& majnum, unsigned& minnum, unsigned& relnum)
+void
+H5Library::getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum)
{
herr_t ret_value = H5get_libversion(&majnum, &minnum, &relnum);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::getLibVersion", "H5get_libversion failed");
}
}
@@ -115,11 +116,11 @@ void H5Library::getLibVersion(unsigned& majnum, unsigned& minnum, unsigned& reln
/// the H5check_version API in the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
+void
+H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
{
herr_t ret_value = H5check_version(majnum, minnum, relnum);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::checkVersion", "H5check_version failed");
}
}
@@ -144,11 +145,11 @@ void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
/// lists when the application ends.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Library::garbageCollect()
+void
+H5Library::garbageCollect()
{
herr_t ret_value = H5garbage_collect();
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw LibraryIException("H5Library::garbageCollect", "H5garbage_collect failed");
}
}
@@ -168,12 +169,13 @@ void H5Library::garbageCollect()
//
// Programmer Binh-Minh Ribler - September, 2015
//--------------------------------------------------------------------------
-void H5Library::initH5cpp()
+void
+H5Library::initH5cpp()
{
// Register terminating functions with atexit(); they will be invoked in
// the reversed order
int ret_value = 0;
- ret_value = std::atexit(termH5cpp);
+ ret_value = std::atexit(termH5cpp);
if (ret_value != 0)
throw LibraryIException("H5Library::initH5cpp", "Registering termH5cpp failed");
@@ -187,35 +189,43 @@ void H5Library::initH5cpp()
ret_value = std::atexit(DSetAccPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering DSetAccPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering DSetAccPropList::deleteConstants failed");
ret_value = std::atexit(LinkAccPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering LinkAccPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering LinkAccPropList::deleteConstants failed");
ret_value = std::atexit(LinkCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering LinkCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering LinkCreatPropList::deleteConstants failed");
ret_value = std::atexit(FileAccPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering FileAccPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering FileAccPropList::deleteConstants failed");
ret_value = std::atexit(FileCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering FileCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering FileCreatPropList::deleteConstants failed");
ret_value = std::atexit(DSetMemXferPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering DSetMemXferPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering DSetMemXferPropList::deleteConstants failed");
ret_value = std::atexit(DSetCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering DSetCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering DSetCreatPropList::deleteConstants failed");
ret_value = std::atexit(ObjCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registering ObjCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp",
+ "Registering ObjCreatPropList::deleteConstants failed");
ret_value = std::atexit(DataSpace::deleteConstants);
if (ret_value != 0)
@@ -229,7 +239,8 @@ void H5Library::initH5cpp()
/// If the C library fails to terminate, exit with a failure.
// Programmer Binh-Minh Ribler - September, 2015
//--------------------------------------------------------------------------
-void H5Library::termH5cpp()
+void
+H5Library::termH5cpp()
{
// Close the C library
herr_t ret_value = H5close();
@@ -253,13 +264,13 @@ void H5Library::termH5cpp()
/// the H5set_free_list_limits API in the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
-void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
- int arr_global_lim, int arr_list_lim, int blk_global_lim,
- int blk_list_lim)
+void
+H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim,
+ int blk_global_lim, int blk_list_lim)
{
- herr_t ret_value = H5set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
- if (ret_value < 0)
- {
+ herr_t ret_value = H5set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim,
+ blk_global_lim, blk_list_lim);
+ if (ret_value < 0) {
throw LibraryIException("H5Library::setFreeListLimits", "H5set_free_list_limits failed");
}
}
@@ -270,14 +281,14 @@ void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
///\brief Default constructor: Creates a stub H5Library object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5Library::H5Library(){}
+H5Library::H5Library() {}
//--------------------------------------------------------------------------
// Function: H5Library destructor
///\brief Noop destructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5Library::~H5Library(){}
+H5Library::~H5Library() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS
-} // end namespace
+} // namespace H5