summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2007-01-30 17:16:52 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2007-01-30 17:16:52 (GMT)
commited25baa0f15f539cc47be0b232b39103fe9bb7fc (patch)
tree7b3d308d7294f00a53dd73f6a3edd17c692c8e21
parente98796c6ed8f59918dcb6cd502dcd2ed6d50ff0a (diff)
downloadhdf5-ed25baa0f15f539cc47be0b232b39103fe9bb7fc.zip
hdf5-ed25baa0f15f539cc47be0b232b39103fe9bb7fc.tar.gz
hdf5-ed25baa0f15f539cc47be0b232b39103fe9bb7fc.tar.bz2
[svn-r13220] Purpose: Adding wrappers
Description: Added wrapper DSetCreatPropList::setSzip. Platforms tested AIX 5.1 (copper) SunOS 5.8 64-bit (sol) Linux 2.6 (kagiso)
-rw-r--r--c++/src/H5DcreatProp.cpp43
-rw-r--r--c++/src/H5DcreatProp.h21
2 files changed, 47 insertions, 17 deletions
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index 70a2096..2dd4052 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -169,6 +169,33 @@ void DSetCreatPropList::setDeflate( int level ) const
}
//--------------------------------------------------------------------------
+// Function: DSetCreatPropList::setSzip
+///\brief Sets up for the use of the SZIP compression filter.
+///\param options_mask - IN: A bit-mask conveying the desired SZIP
+/// options. Valid values are H5_SZIP_EC_OPTION_MASK
+/// and H5_SZIP_NN_OPTION_MASK.
+///\param pixels_per_block - IN: Number of pixels or data elements in
+/// each data block.
+///\exception H5::PropListIException
+///\par Description
+/// The associate C function sets an SZIP compression filter,
+/// H5Z_FILTER_SZIP, for a dataset. For more information about
+/// SZIP and usage, please refer to the C layer Reference
+/// Manual at:
+/// http://hdfgroup.org/HDF5/doc/RM_H5P.html#Property-SetSzip
+// Programmer Binh-Minh Ribler - Jan, 2007
+//--------------------------------------------------------------------------
+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");
+ }
+}
+
+//--------------------------------------------------------------------------
// Function: DSetCreatPropList::setFillValue
///\brief Sets a dataset fill value
///\param fvalue_type - IN: Data type for the value passed via \a value
@@ -229,7 +256,7 @@ void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value )
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_fill_value_t DSetCreatPropList::isFillValueDefined()
+H5D_fill_value_t DSetCreatPropList::isFillValueDefined() const
{
H5D_fill_value_t status;
herr_t ret_value = H5Pfill_value_defined(id, &status);
@@ -412,7 +439,7 @@ void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-bool DSetCreatPropList::allFiltersAvail()
+bool DSetCreatPropList::allFiltersAvail() const
{
htri_t ret_value = H5Pall_filters_avail(id);
if( ret_value > 0 )
@@ -436,7 +463,7 @@ bool DSetCreatPropList::allFiltersAvail()
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setShuffle()
+void DSetCreatPropList::setShuffle() const
{
herr_t ret_value = H5Pset_shuffle(id);
if( ret_value < 0 )
@@ -460,7 +487,7 @@ void DSetCreatPropList::setShuffle()
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_alloc_time_t DSetCreatPropList::getAllocTime()
+H5D_alloc_time_t DSetCreatPropList::getAllocTime() const
{
H5D_alloc_time_t alloc_time;
herr_t ret_value = H5Pget_alloc_time(id, &alloc_time);
@@ -484,7 +511,7 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime()
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5D_fill_time_t DSetCreatPropList::getFillTime()
+H5D_fill_time_t DSetCreatPropList::getFillTime() const
{
H5D_fill_time_t fill_time;
herr_t ret_value = H5Pget_fill_time(id, &fill_time);
@@ -510,7 +537,7 @@ H5D_fill_time_t DSetCreatPropList::getFillTime()
/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
+void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
{
herr_t ret_value = H5Pset_alloc_time(id, alloc_time);
if( ret_value < 0 )
@@ -531,7 +558,7 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)
+void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
{
herr_t ret_value = H5Pset_fill_time(id, fill_time);
if( ret_value < 0 )
@@ -548,7 +575,7 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::setFletcher32()
+void DSetCreatPropList::setFletcher32() const
{
herr_t ret_value = H5Pset_fletcher32(id);
if( ret_value < 0 )
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index e065068..7555551 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -30,13 +30,13 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
// Queries whether all the filters set in this property list are
// available currently.
- bool allFiltersAvail();
+ bool allFiltersAvail() const;
// Get space allocation time for this property.
- H5D_alloc_time_t getAllocTime();
+ H5D_alloc_time_t getAllocTime() const;
// Set space allocation time for dataset during creation.
- void setAllocTime(H5D_alloc_time_t alloc_time);
+ void setAllocTime(H5D_alloc_time_t alloc_time) const;
// Retrieves the size of the chunks used to store a chunked layout dataset.
int getChunk( int max_ndims, hsize_t* dim ) const;
@@ -51,10 +51,10 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
int getExternalCount() const;
// Gets fill value writing time.
- H5D_fill_time_t getFillTime();
+ H5D_fill_time_t getFillTime() const;
// Sets fill value writing time for dataset.
- void setFillTime(H5D_fill_time_t fill_time);
+ void setFillTime(H5D_fill_time_t fill_time) const;
// Retrieves a dataset fill value.
void getFillValue( const DataType& fvalue_type, void* value ) const;
@@ -80,7 +80,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
int getNfilters() const;
// Checks if fill value has been defined for this property.
- H5D_fill_value_t isFillValueDefined();
+ H5D_fill_value_t isFillValueDefined() const;
// Modifies the specified filter.
void modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
@@ -95,13 +95,16 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
void setExternal( const char* name, off_t offset, hsize_t size ) const;
// Adds a filter to the filter pipeline.
- void setFilter( H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const;
+ void setFilter( H5Z_filter_t filter, unsigned int flags = 0, size_t cd_nelmts = 0, const unsigned int cd_values[] = NULL) const;
// Sets Fletcher32 checksum of EDC for this property list.
- void setFletcher32();
+ void setFletcher32() const;
// Sets method of the shuffle filter.
- void setShuffle();
+ void setShuffle() const;
+
+ // Sets SZIP compression method.
+ void setSzip(unsigned int options_mask, unsigned int pixels_per_block) const;
// Returns this class name
virtual H5std_string fromClass () const { return("DSetCreatPropList"); }