summaryrefslogtreecommitdiffstats
path: root/c++/src/H5OcreatProp.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/H5OcreatProp.cpp
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'c++/src/H5OcreatProp.cpp')
-rw-r--r--c++/src/H5OcreatProp.cpp54
1 files changed, 28 insertions, 26 deletions
diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp
index 0542d5e..a5af9df 100644
--- a/c++/src/H5OcreatProp.cpp
+++ b/c++/src/H5OcreatProp.cpp
@@ -27,7 +27,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-ObjCreatPropList* ObjCreatPropList::DEFAULT_ = 0;
+ObjCreatPropList *ObjCreatPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: ObjCreatPropList::getConstant
@@ -40,13 +40,13 @@ ObjCreatPropList* ObjCreatPropList::DEFAULT_ = 0;
// happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-ObjCreatPropList* ObjCreatPropList::getConstant()
+ObjCreatPropList *
+ObjCreatPropList::getConstant()
{
// Tell the C library not to clean up, H5Library::termH5cpp will call
// H5close - more dependency if use H5Library::dontAtExit()
- if (!IdComponent::H5dontAtexit_called)
- {
- (void) H5dont_atexit();
+ if (!IdComponent::H5dontAtexit_called) {
+ (void)H5dont_atexit();
IdComponent::H5dontAtexit_called = true;
}
@@ -55,8 +55,9 @@ ObjCreatPropList* ObjCreatPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new ObjCreatPropList(H5P_OBJECT_CREATE);
else
- throw PropListIException("ObjCreatPropList::getConstant", "ObjCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("ObjCreatPropList::getConstant",
+ "ObjCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -66,7 +67,8 @@ ObjCreatPropList* ObjCreatPropList::getConstant()
// exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::deleteConstants()
+void
+ObjCreatPropList::deleteConstants()
{
if (DEFAULT_ != 0)
delete DEFAULT_;
@@ -75,7 +77,7 @@ void ObjCreatPropList::deleteConstants()
//--------------------------------------------------------------------------
// Purpose: Constant for default property
//--------------------------------------------------------------------------
-const ObjCreatPropList& ObjCreatPropList::DEFAULT = *getConstant();
+const ObjCreatPropList &ObjCreatPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -92,7 +94,7 @@ ObjCreatPropList::ObjCreatPropList() : PropList(H5P_OBJECT_CREATE) {}
///\param original - IN: ObjCreatPropList instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList& original) : PropList(original) {}
+ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList &original) : PropList(original) {}
//--------------------------------------------------------------------------
// Function: ObjCreatPropList overloaded constructor
@@ -116,11 +118,11 @@ ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
/// H5Pset_attr_phase_change API in the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const
+void
+ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const
{
herr_t ret_value = H5Pset_attr_phase_change(id, max_compact, min_dense);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::setAttrPhaseChange", "H5Pset_attr_phase_change failed");
}
}
@@ -139,12 +141,12 @@ void ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_den
/// H5Pget_attr_phase_change API in the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_dense) const
+void
+ObjCreatPropList::getAttrPhaseChange(unsigned &max_compact, unsigned &min_dense) const
{
herr_t ret_value;
ret_value = H5Pget_attr_phase_change(id, &max_compact, &min_dense);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::getAttrPhaseChange", "H5Pget_attr_phase_change failed");
}
}
@@ -168,11 +170,11 @@ void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_d
/// in the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
+void
+ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
{
herr_t ret_value = H5Pset_attr_creation_order(id, crt_order_flags);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::setAttrCrtOrder", "H5Pset_attr_creation_order failed");
}
}
@@ -190,16 +192,16 @@ void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
/// in the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
-unsigned ObjCreatPropList::getAttrCrtOrder() const
+unsigned
+ObjCreatPropList::getAttrCrtOrder() const
{
- herr_t ret_value;
+ herr_t ret_value;
unsigned crt_order_flags = 0;
- ret_value = H5Pget_attr_creation_order(id, &crt_order_flags);
- if (ret_value < 0)
- {
+ ret_value = H5Pget_attr_creation_order(id, &crt_order_flags);
+ if (ret_value < 0) {
throw PropListIException("ObjCreatPropList::getAttrCrtOrder", "H5Pget_attr_creation_order failed");
}
- return(crt_order_flags);
+ return (crt_order_flags);
}
//--------------------------------------------------------------------------
@@ -209,4 +211,4 @@ unsigned ObjCreatPropList::getAttrCrtOrder() const
//--------------------------------------------------------------------------
ObjCreatPropList::~ObjCreatPropList() {}
-} // end namespace
+} // namespace H5