summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DcreatProp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5DcreatProp.cpp')
-rw-r--r--c++/src/H5DcreatProp.cpp314
1 files changed, 154 insertions, 160 deletions
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index 79ff100..da19d8d 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -35,7 +35,7 @@ namespace H5 {
// in "H5PredType.cpp" for information.
// Initialize a pointer for the constant
-DSetCreatPropList* DSetCreatPropList::DEFAULT_ = 0;
+DSetCreatPropList *DSetCreatPropList::DEFAULT_ = 0;
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::getConstant
@@ -49,13 +49,13 @@ DSetCreatPropList* DSetCreatPropList::DEFAULT_ = 0;
// not happen.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-DSetCreatPropList* DSetCreatPropList::getConstant()
+DSetCreatPropList *
+DSetCreatPropList::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;
}
@@ -64,8 +64,9 @@ DSetCreatPropList* DSetCreatPropList::getConstant()
if (DEFAULT_ == 0)
DEFAULT_ = new DSetCreatPropList(H5P_DATASET_CREATE);
else
- throw PropListIException("DSetCreatPropList::getConstant", "DSetCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
- return(DEFAULT_);
+ throw PropListIException("DSetCreatPropList::getConstant",
+ "DSetCreatPropList::getConstant is being invoked on an allocated DEFAULT_");
+ return (DEFAULT_);
}
//--------------------------------------------------------------------------
@@ -74,16 +75,16 @@ DSetCreatPropList* DSetCreatPropList::getConstant()
// points to.
// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
-void DSetCreatPropList::deleteConstants()
+void
+DSetCreatPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
// Purpose Constant for dataset creation default property
//--------------------------------------------------------------------------
-const DSetCreatPropList& DSetCreatPropList::DEFAULT = *getConstant();
+const DSetCreatPropList &DSetCreatPropList::DEFAULT = *getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -92,7 +93,9 @@ const DSetCreatPropList& DSetCreatPropList::DEFAULT = *getConstant();
///\brief Default constructor: creates a stub dataset creation property list
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE) {}
+DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE)
+{
+}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList copy constructor
@@ -100,7 +103,9 @@ DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE) {}
/// DSetCreatPropList object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList& orig) : ObjCreatPropList(orig) {}
+DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList &orig) : ObjCreatPropList(orig)
+{
+}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList overloaded constructor
@@ -108,7 +113,9 @@ DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList& orig) : ObjCreatPr
/// existing dataset creation property list.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(plist_id) {}
+DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(plist_id)
+{
+}
//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setChunk
@@ -125,11 +132,11 @@ DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(pl
/// changed to \c H5D_CHUNKED, if it is not so already.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setChunk(int ndims, const hsize_t* dim) const
+void
+DSetCreatPropList::setChunk(int ndims, const hsize_t *dim) const
{
herr_t ret_value = H5Pset_chunk(id, ndims, dim);
- if (ret_value < 0)
- {
+ if (ret_value < 0) {
throw PropListIException("DSetCreatPropList::setChunk", "H5Pset_chunk failed");
}
}
@@ -143,15 +150,14 @@ void DSetCreatPropList::setChunk(int ndims, const hsize_t* dim) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DSetCreatPropList::getChunk(int max_ndims, hsize_t* dim) const
+int
+DSetCreatPropList::getChunk(int max_ndims, hsize_t *dim) const
{
int chunk_size = H5Pget_chunk(id, max_ndims, dim);
- if (chunk_size < 0)
- {
- throw PropListIException("DSetCreatPropList::getChunk",
- "H5Pget_chunk returns negative chunk size");
+ if (chunk_size < 0) {
+ throw PropListIException("DSetCreatPropList::getChunk", "H5Pget_chunk returns negative chunk size");
}
- return(chunk_size);
+ return (chunk_size);
}
//--------------------------------------------------------------------------
@@ -164,13 +170,12 @@ int DSetCreatPropList::getChunk(int max_ndims, hsize_t* dim) const
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setLayout(H5D_layout_t layout) const
+void
+DSetCreatPropList::setLayout(H5D_layout_t layout) const
{
herr_t ret_value = H5Pset_layout(id, layout);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setLayout",
- "H5Pset_layout failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setLayout", "H5Pset_layout failed");
}
}
@@ -190,15 +195,14 @@ void DSetCreatPropList::setLayout(H5D_layout_t layout) const
///\par Description
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_layout_t DSetCreatPropList::getLayout() const
+H5D_layout_t
+DSetCreatPropList::getLayout() const
{
H5D_layout_t layout = H5Pget_layout(id);
- if (layout == H5D_LAYOUT_ERROR)
- {
- throw PropListIException("DSetCreatPropList::getLayout",
- "H5Pget_layout returns H5D_LAYOUT_ERROR");
+ if (layout == H5D_LAYOUT_ERROR) {
+ throw PropListIException("DSetCreatPropList::getLayout", "H5Pget_layout returns H5D_LAYOUT_ERROR");
}
- return(layout);
+ return (layout);
}
//--------------------------------------------------------------------------
@@ -213,13 +217,12 @@ H5D_layout_t DSetCreatPropList::getLayout() const
/// less compression.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setDeflate(int level) const
+void
+DSetCreatPropList::setDeflate(int level) const
{
herr_t ret_value = H5Pset_deflate(id, level);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setDeflate",
- "H5Pset_deflate failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setDeflate", "H5Pset_deflate failed");
}
}
@@ -239,13 +242,12 @@ void DSetCreatPropList::setDeflate(int level) const
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
-void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const
+void
+DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const
{
herr_t ret_value = H5Pset_szip(id, options_mask, pixels_per_block);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setSzip",
- "H5Pset_szip failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setSzip", "H5Pset_szip failed");
}
}
@@ -261,13 +263,12 @@ void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_p
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - Apr, 2016
//--------------------------------------------------------------------------
-void DSetCreatPropList::setNbit() const
+void
+DSetCreatPropList::setNbit() const
{
herr_t ret_value = H5Pset_nbit(id);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setNbit",
- "H5Pset_nbit failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setNbit", "H5Pset_nbit failed");
}
}
@@ -288,13 +289,12 @@ void DSetCreatPropList::setNbit() const
/// H5Pset_fill_value API in the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFillValue(const DataType& fvalue_type, const void* value) const
+void
+DSetCreatPropList::setFillValue(const DataType &fvalue_type, const void *value) const
{
herr_t ret_value = H5Pset_fill_value(id, fvalue_type.getId(), value);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFillValue",
- "H5Pset_fill_value failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFillValue", "H5Pset_fill_value failed");
}
}
@@ -311,13 +311,12 @@ void DSetCreatPropList::setFillValue(const DataType& fvalue_type, const void* va
/// specified by \a fvalue_type.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getFillValue(const DataType& fvalue_type, void* value) const
+void
+DSetCreatPropList::getFillValue(const DataType &fvalue_type, void *value) const
{
herr_t ret_value = H5Pget_fill_value(id, fvalue_type.getId(), value);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getFillValue",
- "H5Pget_fill_value failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getFillValue", "H5Pget_fill_value failed");
}
}
@@ -331,14 +330,14 @@ void DSetCreatPropList::getFillValue(const DataType& fvalue_type, void* value) c
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_fill_value_t DSetCreatPropList::isFillValueDefined() const
+H5D_fill_value_t
+DSetCreatPropList::isFillValueDefined() const
{
H5D_fill_value_t status;
- herr_t ret_value = H5Pfill_value_defined(id, &status);
- if (ret_value < 0)
- {
+ herr_t ret_value = H5Pfill_value_defined(id, &status);
+ if (ret_value < 0) {
throw PropListIException("DSetCreatPropList::isFillValueDefined",
- "H5Pfill_value_defined returned H5D_FILL_VALUE_ERROR (-1)");
+ "H5Pfill_value_defined returned H5D_FILL_VALUE_ERROR (-1)");
}
else
return (status);
@@ -364,14 +363,13 @@ H5D_fill_value_t DSetCreatPropList::isFillValueDefined() const
/// and the filter fails then the entire I/O operation fails.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags,
- size_t cd_nelmts, const unsigned int cd_values[]) const
+void
+DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
+ const unsigned int cd_values[]) const
{
herr_t ret_value = H5Pset_filter(id, filter_id, flags, cd_nelmts, cd_values);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFilter",
- "H5Pset_filter failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFilter", "H5Pset_filter failed");
}
}
@@ -385,13 +383,12 @@ void DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags,
/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
+void
+DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
{
herr_t ret_value = H5Premove_filter(id, filter_id);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::removeFilter",
- "H5Premove_filter failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::removeFilter", "H5Premove_filter failed");
}
}
@@ -402,16 +399,16 @@ void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DSetCreatPropList::getNfilters() const
+int
+DSetCreatPropList::getNfilters() const
{
int num_filters = H5Pget_nfilters(id);
- if (num_filters < 0)
- {
+ if (num_filters < 0) {
throw PropListIException("DSetCreatPropList::getNfilters",
- "H5Pget_nfilters returned negative number of filters");
+ "H5Pget_nfilters returned negative number of filters");
}
else
- return(num_filters);
+ return (num_filters);
}
//--------------------------------------------------------------------------
@@ -434,18 +431,18 @@ int DSetCreatPropList::getNfilters() const
// of unsigned int, but for backward compatibility, it cannot be
// changed. -BMR (2014/04/15)
//--------------------------------------------------------------------------
-H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
- unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
- size_t namelen, char name[], unsigned int& filter_config) const
+H5Z_filter_t
+DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_nelmts,
+ unsigned int *cd_values, size_t namelen, char name[],
+ unsigned int &filter_config) const
{
H5Z_filter_t filter_id;
- filter_id = H5Pget_filter2(id, filter_number, &flags, &cd_nelmts,
- cd_values, namelen, name, &filter_config);
+ filter_id =
+ H5Pget_filter2(id, filter_number, &flags, &cd_nelmts, cd_values, namelen, name, &filter_config);
if (filter_id == H5Z_FILTER_ERROR)
- throw PropListIException("DSetCreatPropList::getFilter",
- "H5Pget_filter2 returned H5Z_FILTER_ERROR");
+ throw PropListIException("DSetCreatPropList::getFilter", "H5Pget_filter2 returned H5Z_FILTER_ERROR");
else
- return(filter_id);
+ return (filter_id);
}
//--------------------------------------------------------------------------
@@ -463,15 +460,15 @@ H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id,
- unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
- size_t namelen, char name[], unsigned int &filter_config) const
+void
+DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts,
+ unsigned int *cd_values, size_t namelen, char name[],
+ unsigned int &filter_config) const
{
- herr_t ret_value = H5Pget_filter_by_id2(id, filter_id, &flags, &cd_nelmts,
- cd_values, namelen, name, &filter_config);
+ herr_t ret_value =
+ H5Pget_filter_by_id2(id, filter_id, &flags, &cd_nelmts, cd_values, namelen, name, &filter_config);
if (ret_value < 0)
- throw PropListIException("DSetCreatPropList::getFilterById",
- "H5Pget_filter_by_id2 failed");
+ throw PropListIException("DSetCreatPropList::getFilterById", "H5Pget_filter_by_id2 failed");
}
//--------------------------------------------------------------------------
@@ -495,14 +492,13 @@ void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id,
/// and the filter fails then the entire I/O operation fails.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int
- flags, size_t cd_nelmts, const unsigned int cd_values[]) const
+void
+DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
+ const unsigned int cd_values[]) const
{
herr_t ret_value = H5Pmodify_filter(id, filter_id, flags, cd_nelmts, cd_values);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::modifyFilter",
- "H5Pmodify_filter failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::modifyFilter", "H5Pmodify_filter failed");
}
}
@@ -515,7 +511,8 @@ void DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DSetCreatPropList::allFiltersAvail() const
+bool
+DSetCreatPropList::allFiltersAvail() const
{
htri_t ret_value = H5Pall_filters_avail(id);
if (ret_value > 0)
@@ -524,7 +521,8 @@ bool DSetCreatPropList::allFiltersAvail() const
return false;
else // Raise exception when H5Pall_filters_avail returns a negative value
{
- throw PropListIException("DSetCreatPropList::allFiltersAvail", "H5Pall_filters_avail returned negative value");
+ throw PropListIException("DSetCreatPropList::allFiltersAvail",
+ "H5Pall_filters_avail returned negative value");
}
}
@@ -538,13 +536,12 @@ bool DSetCreatPropList::allFiltersAvail() const
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setShuffle() const
+void
+DSetCreatPropList::setShuffle() const
{
herr_t ret_value = H5Pset_shuffle(id);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setShuffle",
- "H5Pset_shuffle failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setShuffle", "H5Pset_shuffle failed");
}
}
@@ -555,21 +552,20 @@ void DSetCreatPropList::setShuffle() const
///\exception H5::PropListIException
///\par Description
/// The values of space allocation time can be one of the
-/// followings:
+/// following:
/// \li \c H5D_ALLOC_TIME_DEFAULT
/// \li \c H5D_ALLOC_TIME_EARLY
/// \li \c H5D_ALLOC_TIME_LATE
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_alloc_time_t DSetCreatPropList::getAllocTime() const
+H5D_alloc_time_t
+DSetCreatPropList::getAllocTime() const
{
H5D_alloc_time_t alloc_time;
- herr_t ret_value = H5Pget_alloc_time(id, &alloc_time);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getAllocTime",
- "H5Pget_alloc_time failed");
+ herr_t ret_value = H5Pget_alloc_time(id, &alloc_time);
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getAllocTime", "H5Pget_alloc_time failed");
}
else
return (alloc_time);
@@ -586,14 +582,13 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime() const
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_fill_time_t DSetCreatPropList::getFillTime() const
+H5D_fill_time_t
+DSetCreatPropList::getFillTime() const
{
H5D_fill_time_t fill_time;
- herr_t ret_value = H5Pget_fill_time(id, &fill_time);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getFillTime",
- "H5Pget_fill_time failed");
+ herr_t ret_value = H5Pget_fill_time(id, &fill_time);
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getFillTime", "H5Pget_fill_time failed");
}
else
return (fill_time);
@@ -612,13 +607,12 @@ H5D_fill_time_t DSetCreatPropList::getFillTime() const
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
+void
+DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
{
herr_t ret_value = H5Pset_alloc_time(id, alloc_time);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setAllocTime",
- "H5Pset_alloc_time failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setAllocTime", "H5Pset_alloc_time failed");
}
}
@@ -633,13 +627,12 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
+void
+DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
{
herr_t ret_value = H5Pset_fill_time(id, fill_time);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFillTime",
- "H5Pset_fill_time failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFillTime", "H5Pset_fill_time failed");
}
}
@@ -650,13 +643,12 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFletcher32() const
+void
+DSetCreatPropList::setFletcher32() const
{
herr_t ret_value = H5Pset_fletcher32(id);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setFletcher32",
- "H5Pset_fletcher32 failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setFletcher32", "H5Pset_fletcher32 failed");
}
}
@@ -676,13 +668,12 @@ void DSetCreatPropList::setFletcher32() const
/// the extending).
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setExternal(const char* name, off_t offset, hsize_t size) const
+void
+DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) const
{
herr_t ret_value = H5Pset_external(id, name, offset, size);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setExternal",
- "H5Pset_external failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setExternal", "H5Pset_external failed");
}
}
@@ -693,16 +684,16 @@ void DSetCreatPropList::setExternal(const char* name, off_t offset, hsize_t size
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int DSetCreatPropList::getExternalCount() const
+int
+DSetCreatPropList::getExternalCount() const
{
int num_ext_files = H5Pget_external_count(id);
- if (num_ext_files < 0)
- {
+ if (num_ext_files < 0) {
throw PropListIException("DSetCreatPropList::getExternalCount",
- "H5Pget_external_count returns negative number of external files");
+ "H5Pget_external_count returns negative number of external files");
}
else
- return(num_ext_files);
+ return (num_ext_files);
}
//--------------------------------------------------------------------------
@@ -727,13 +718,12 @@ int DSetCreatPropList::getExternalCount() const
/// will not be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size) const
+void
+DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const
{
herr_t ret_value = H5Pget_external(id, idx, name_size, name, &offset, &size);
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::getExternal",
- "H5Pget_external failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::getExternal", "H5Pget_external failed");
}
}
@@ -755,13 +745,13 @@ void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name,
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - Mar, 2017
//--------------------------------------------------------------------------
-void DSetCreatPropList::setVirtual(const DataSpace& vspace, const char *src_fname, const char *src_dsname, const DataSpace& sspace) const
+void
+DSetCreatPropList::setVirtual(const DataSpace &vspace, const char *src_fname, const char *src_dsname,
+ const DataSpace &sspace) const
{
herr_t ret_value = H5Pset_virtual(id, vspace.getId(), src_fname, src_dsname, sspace.getId());
- if (ret_value < 0)
- {
- throw PropListIException("DSetCreatPropList::setVirtual",
- "H5Pset_virtual failed");
+ if (ret_value < 0) {
+ throw PropListIException("DSetCreatPropList::setVirtual", "H5Pset_virtual failed");
}
}
@@ -783,7 +773,9 @@ void DSetCreatPropList::setVirtual(const DataSpace& vspace, const char *src_fnam
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - Mar, 2017
//--------------------------------------------------------------------------
-void DSetCreatPropList::setVirtual(const DataSpace& vspace, const H5std_string src_fname, const H5std_string src_dsname, const DataSpace& sspace) const
+void
+DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fname,
+ const H5std_string src_dsname, const DataSpace &sspace) const
{
setVirtual(vspace, src_fname.c_str(), src_dsname.c_str(), sspace);
}
@@ -793,6 +785,8 @@ void DSetCreatPropList::setVirtual(const DataSpace& vspace, const H5std_string s
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DSetCreatPropList::~DSetCreatPropList() {}
+DSetCreatPropList::~DSetCreatPropList()
+{
+}
-} // end namespace
+} // namespace H5