summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DcreatProp.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-04-23 21:40:27 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-04-23 21:40:27 (GMT)
commit326030c665c53dfb04491a92ec88e38749bfbeb0 (patch)
tree161d3ee173a6078f171db492ac23765f9314ea3c /c++/src/H5DcreatProp.cpp
parent816fb3b0fc2043ec04805bc4853d54d2cbfd188f (diff)
downloadhdf5-326030c665c53dfb04491a92ec88e38749bfbeb0.zip
hdf5-326030c665c53dfb04491a92ec88e38749bfbeb0.tar.gz
hdf5-326030c665c53dfb04491a92ec88e38749bfbeb0.tar.bz2
Format changes only.
Platforms tested: Linux/32 2.6 (jam) - very minor
Diffstat (limited to 'c++/src/H5DcreatProp.cpp')
-rw-r--r--c++/src/H5DcreatProp.cpp302
1 files changed, 151 insertions, 151 deletions
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index 0aa9a91..7f4bbf9 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -98,7 +98,7 @@ 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
@@ -123,13 +123,13 @@ 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 )
- {
- throw PropListIException("DSetCreatPropList::setChunk", "H5Pset_chunk failed");
- }
+ herr_t ret_value = H5Pset_chunk(id, ndims, dim);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setChunk", "H5Pset_chunk failed");
+ }
}
//--------------------------------------------------------------------------
@@ -141,15 +141,15 @@ 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",
+ int chunk_size = H5Pget_chunk(id, max_ndims, dim);
+ if(chunk_size < 0)
+ {
+ throw PropListIException("DSetCreatPropList::getChunk",
"H5Pget_chunk returns negative chunk size");
- }
- return( chunk_size );
+ }
+ return(chunk_size);
}
//--------------------------------------------------------------------------
@@ -164,12 +164,12 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) 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",
+ herr_t ret_value = H5Pset_layout(id, layout);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setLayout",
"H5Pset_layout failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -190,13 +190,13 @@ void DSetCreatPropList::setLayout(H5D_layout_t layout) const
//--------------------------------------------------------------------------
H5D_layout_t DSetCreatPropList::getLayout() const
{
- H5D_layout_t layout = H5Pget_layout( id );
- if( layout == H5D_LAYOUT_ERROR )
- {
- throw PropListIException("DSetCreatPropList::getLayout",
+ H5D_layout_t layout = H5Pget_layout(id);
+ if(layout == H5D_LAYOUT_ERROR)
+ {
+ throw PropListIException("DSetCreatPropList::getLayout",
"H5Pget_layout returns H5D_LAYOUT_ERROR");
- }
- return( layout );
+ }
+ return(layout);
}
//--------------------------------------------------------------------------
@@ -211,14 +211,14 @@ 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",
+ herr_t ret_value = H5Pset_deflate(id, level);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setDeflate",
"H5Pset_deflate failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -241,7 +241,7 @@ void DSetCreatPropList::setDeflate( int level ) 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 )
+ if(ret_value < 0)
{
throw PropListIException("DSetCreatPropList::setSzip",
"H5Pset_szip failed");
@@ -263,7 +263,7 @@ void DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_p
void DSetCreatPropList::setNbit() const
{
herr_t ret_value = H5Pset_nbit(id);
- if( ret_value < 0 )
+ if(ret_value < 0)
{
throw PropListIException("DSetCreatPropList::setNbit",
"H5Pset_nbit failed");
@@ -288,14 +288,14 @@ void DSetCreatPropList::setNbit() const
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFillValue
// 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",
+ herr_t ret_value = H5Pset_fill_value(id, fvalue_type.getId(), value);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setFillValue",
"H5Pset_fill_value failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -311,14 +311,14 @@ void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* v
/// 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",
+ herr_t ret_value = H5Pget_fill_value(id, fvalue_type.getId(), value);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::getFillValue",
"H5Pget_fill_value failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -333,15 +333,15 @@ void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value )
//--------------------------------------------------------------------------
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 )
- {
- throw PropListIException("DSetCreatPropList::isFillValueDefined",
+ H5D_fill_value_t status;
+ 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)");
- }
- else
- return (status);
+ }
+ else
+ return (status);
}
//--------------------------------------------------------------------------
@@ -364,15 +364,15 @@ 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",
+ 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");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -387,12 +387,12 @@ void DSetCreatPropList::setFilter( H5Z_filter_t filter_id, unsigned int flags,
//--------------------------------------------------------------------------
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",
+ herr_t ret_value = H5Premove_filter(id, filter_id);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::removeFilter",
"H5Premove_filter failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -404,14 +404,14 @@ void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
//--------------------------------------------------------------------------
int DSetCreatPropList::getNfilters() const
{
- int num_filters = H5Pget_nfilters( id );
- if( num_filters < 0 )
- {
- throw PropListIException("DSetCreatPropList::getNfilters",
+ int num_filters = H5Pget_nfilters(id);
+ if(num_filters < 0)
+ {
+ throw PropListIException("DSetCreatPropList::getNfilters",
"H5Pget_nfilters returned negative number of filters");
- }
- else
- return( num_filters );
+ }
+ else
+ return(num_filters);
}
//--------------------------------------------------------------------------
@@ -438,14 +438,14 @@ 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,
+ H5Z_filter_t filter_id;
+ 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",
+ if(filter_id == H5Z_FILTER_ERROR)
+ throw PropListIException("DSetCreatPropList::getFilter",
"H5Pget_filter2 returned H5Z_FILTER_ERROR");
else
- return(filter_id);
+ return(filter_id);
}
//--------------------------------------------------------------------------
@@ -467,10 +467,10 @@ 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,
+ 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",
+ if (ret_value < 0)
+ throw PropListIException("DSetCreatPropList::getFilterById",
"H5Pget_filter_by_id2 failed");
}
@@ -495,15 +495,15 @@ 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",
+ 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");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -517,15 +517,15 @@ void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int
//--------------------------------------------------------------------------
bool DSetCreatPropList::allFiltersAvail() const
{
- htri_t ret_value = H5Pall_filters_avail(id);
- if( ret_value > 0 )
- return true;
- else if( ret_value == 0 )
- return false;
- else // Raise exception when H5Pall_filters_avail returns a negative value
- {
- throw PropListIException("DSetCreatPropList::allFiltersAvail", "H5Pall_filters_avail returned negative value");
- }
+ htri_t ret_value = H5Pall_filters_avail(id);
+ if(ret_value > 0)
+ return true;
+ else if(ret_value == 0)
+ return false;
+ else // Raise exception when H5Pall_filters_avail returns a negative value
+ {
+ throw PropListIException("DSetCreatPropList::allFiltersAvail", "H5Pall_filters_avail returned negative value");
+ }
}
//--------------------------------------------------------------------------
@@ -541,12 +541,12 @@ bool DSetCreatPropList::allFiltersAvail() const
//--------------------------------------------------------------------------
void DSetCreatPropList::setShuffle() const
{
- herr_t ret_value = H5Pset_shuffle(id);
- if( ret_value < 0 )
- {
- throw PropListIException("DSetCreatPropList::setShuffle",
+ herr_t ret_value = H5Pset_shuffle(id);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setShuffle",
"H5Pset_shuffle failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -565,15 +565,15 @@ void DSetCreatPropList::setShuffle() 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",
+ 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");
- }
- else
- return (alloc_time);
+ }
+ else
+ return (alloc_time);
}
//--------------------------------------------------------------------------
@@ -589,15 +589,15 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime() 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",
+ 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");
- }
- else
- return (fill_time);
+ }
+ else
+ return (fill_time);
}
//--------------------------------------------------------------------------
@@ -615,12 +615,12 @@ H5D_fill_time_t DSetCreatPropList::getFillTime() 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",
+ herr_t ret_value = H5Pset_alloc_time(id, alloc_time);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setAllocTime",
"H5Pset_alloc_time failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -636,12 +636,12 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_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",
+ herr_t ret_value = H5Pset_fill_time(id, fill_time);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setFillTime",
"H5Pset_fill_time failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -653,12 +653,12 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
//--------------------------------------------------------------------------
void DSetCreatPropList::setFletcher32() const
{
- herr_t ret_value = H5Pset_fletcher32(id);
- if( ret_value < 0 )
- {
- throw PropListIException("DSetCreatPropList::setFletcher32",
+ herr_t ret_value = H5Pset_fletcher32(id);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setFletcher32",
"H5Pset_fletcher32 failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -677,14 +677,14 @@ 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",
+ herr_t ret_value = H5Pset_external(id, name, offset, size);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::setExternal",
"H5Pset_external failed");
- }
+ }
}
//--------------------------------------------------------------------------
@@ -696,14 +696,14 @@ void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t siz
//--------------------------------------------------------------------------
int DSetCreatPropList::getExternalCount() const
{
- int num_ext_files = H5Pget_external_count( id );
- if( num_ext_files < 0 )
- {
- throw PropListIException("DSetCreatPropList::getExternalCount",
+ int num_ext_files = H5Pget_external_count(id);
+ if(num_ext_files < 0)
+ {
+ throw PropListIException("DSetCreatPropList::getExternalCount",
"H5Pget_external_count returns negative number of external files");
- }
- else
- return( num_ext_files );
+ }
+ else
+ return(num_ext_files);
}
//--------------------------------------------------------------------------
@@ -728,14 +728,14 @@ 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",
+ herr_t ret_value = H5Pget_external(id, idx, name_size, name, &offset, &size);
+ if(ret_value < 0)
+ {
+ throw PropListIException("DSetCreatPropList::getExternal",
"H5Pget_external failed");
- }
+ }
}
//--------------------------------------------------------------------------