summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DxferProp.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2004-05-02 22:05:25 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2004-05-02 22:05:25 (GMT)
commitdb8f63f552de78aed3a0a773240380445519fdaf (patch)
tree84fd4d92821a9d45a9cee88a7231753a2c1b8118 /c++/src/H5DxferProp.cpp
parent51455f42822a4bfba5ceaf827a8e4a6a98d1c408 (diff)
downloadhdf5-db8f63f552de78aed3a0a773240380445519fdaf.zip
hdf5-db8f63f552de78aed3a0a773240380445519fdaf.tar.gz
hdf5-db8f63f552de78aed3a0a773240380445519fdaf.tar.bz2
[svn-r8465] Purpose:
Add more C++ wrappers - incrementally check-in Description: Added wrapper for many C property list functions and added Doxygen documentation to existing C++ functions in these files. This is an incremental check-in to preserve the code, corresponding tests will follow in a few weeks. For H5PropList.h and H5PropList.cpp, added C++ wrappers for: H5Pexist H5Pclose_class H5Pget H5Pget_size H5Pget_class_name H5Pget_nprops H5Pset H5Pisa_class H5Premove H5Pequal H5Pget_class_parent For H5FaccProp.h and H5FaccProp.cpp, added C++ wrappers for: H5Ps[g]et_driver H5Ps[g]et_family_offset H5Ps[g]et_fapl_core H5Ps[g]et_fapl_family H5Ps[g]et_fapl_stream H5Ps[g]et_sieve_buf_size H5Ps[g]et_meta_block_size H5Ps[g]et_alignment H5Ps[g]et_multi_type H5Ps[g]et_fclose_degree H5Pset_fapl_stdio H5Pset_fapl_split H5Pset_fapl_log H5Pset_fapl_sec2 For H5FcreatProp.h and H5FcreatProp.cpp, added C++ wrappers for: H5Pfill_value_defined H5Premove_filter H5Pget_filter_by_id H5Pmodify_filter H5Pall_filters_avail H5Pset_shuffle H5Ps[g]et_alloc_time H5Ps[g]et_fill_time H5Pset_fletcher32 For H5DxferProp.h and H5DxferProp.cpp, added C++ wrappers for: H5Ps[g]et_dxpl_multi H5Ps[g]et_small_data_block_size H5Ps[g]et_hyper_vector_size H5Ps[g]et_edc_check Platforms: SunOS 5.7 (arabica) Linux 2.4 (eirene) SunOS 5.8-64 (sol)
Diffstat (limited to 'c++/src/H5DxferProp.cpp')
-rw-r--r--c++/src/H5DxferProp.cpp212
1 files changed, 167 insertions, 45 deletions
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index cf5ef81..8d614c4 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -27,10 +27,22 @@ namespace H5 {
const DSetMemXferPropList DSetMemXferPropList::DEFAULT( H5P_DEFAULT );
-// Creates a dataset memory and transfer property list
-DSetMemXferPropList::DSetMemXferPropList() : PropList( H5P_DATASET_XFER) {}
+//--------------------------------------------------------------------------
+// Function Default constructor
+///\brief Default constructor - Creates a stub dataset memory and
+/// transfer property list object.
+// Programmer: Binh-Minh Ribler
+//--------------------------------------------------------------------------
+DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER) {}
-// Copy constructor: makes a copy of the original DSetMemXferPropList object;
+//--------------------------------------------------------------------------
+// Function Copy constructor
+///\brief Copy constructor - makes a copy of the original
+/// DSetMemXferPropList object
+///\param orig - IN: The original dataset memory and transfer property
+/// list object to copy
+// Programmer: Binh-Minh Ribler
+//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList( const DSetMemXferPropList& orig ) : PropList( orig ) {}
// Sets type conversion and background buffers
@@ -104,30 +116,6 @@ void DSetMemXferPropList::getBtreeRatios( double& left, double& middle, double&
}
}
-// Sets an exception handling callback for datatype conversion
-// for a dataset transfer property list
-void DSetMemXferPropList::setTypeConvCB( H5T_conv_except_func_t op, void *user_data) const
-{
- herr_t ret_value = H5Pset_type_conv_cb( id, op, user_data);
- if( ret_value < 0 )
- {
- throw PropListIException("DSetMemXferPropList::setTypeConvCB",
- "H5Pset_type_conv_cb failed");
- }
-}
-
-// Sets an exception handling callback for datatype conversion
-// for a dataset transfer property list
-void DSetMemXferPropList::getTypeConvCB( H5T_conv_except_func_t *op, void **user_data) const
-{
- herr_t ret_value = H5Pget_type_conv_cb( id, op, user_data);
- if( ret_value < 0 )
- {
- throw PropListIException("DSetMemXferPropList::getTypeConvCB",
- "H5Pget_type_conv_cb failed");
- }
-}
-
// Sets the memory manager for variable-length datatype allocation
void DSetMemXferPropList::setVlenMemManager( H5MM_allocate_t alloc_func, void* alloc_info, H5MM_free_t free_func, void* free_info ) const
{
@@ -164,34 +152,167 @@ void DSetMemXferPropList::getVlenMemManager( H5MM_allocate_t& alloc_func, void**
}
}
-/* this function is in parallel mode only - not supported at this time.
-// Sets the transfer mode
-void DSetMemXferPropList::setXfer( H5D_transfer_t data_xfer_mode = H5D_XFER_INDEPENDENT ) const
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::setMulti
+///\brief Sets the data transfer property list for the multi-file driver.
+///\param memb_dxpl - OUT: Array of data access property lists
+///\exception H5::PropListIException
+///\par Description
+/// This function can only be used after the member map has
+/// been set with FileAccPropList::setMulti (not done - BMR.)
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+void DSetMemXferPropList::setMulti(const hid_t *memb_dxpl)
{
- herr_t ret_value = H5Pset_xfer( ... );
- if( ret_value < 0 )
+ herr_t ret_value = H5Pset_dxpl_multi(id, memb_dxpl);
+ if (ret_value < 0)
{
- throw PropListIException("DSetMemXferPropList::setXfer",
- "H5Pset_xfer failed");
+ throw PropListIException("DSetMemXferPropList::setMulti",
+ "H5Pset_dxpl_multi failed");
}
}
-// this function is in parallel mode only - not supported at this time.
-// Gets the transfer mode
-H5D_transfer_t DSetMemXferPropList::getXfer() const
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::getMulti
+///\brief Returns multi-file data transfer property list information.
+///\param memb_dxpl - OUT: Array of data access property lists
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+void DSetMemXferPropList::getMulti(hid_t *memb_dxpl)
{
- H5D_transfer_t xfer = H5Pget_xfer( id );
-// BMR - need to find out what the value is for ?? when this function
-// is supported
- if( xfer == ?? )
+ herr_t ret_value = H5Pget_dxpl_multi(id, memb_dxpl);
+ if (ret_value < 0)
{
- throw PropListIException("DSetMemXferPropList::getXfer",
- "H5Pget_xfer failed");
+ throw PropListIException("DSetMemXferPropList::getMulti",
+ "H5Pget_dxpl_multi failed");
}
- return( xfer );
}
-*/
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::setSmallDataBlockSize
+///\brief Sets the size of a contiguous block reserved for small data.
+///\param size - IN: Maximum size, in bytes, of the small data block.
+///\exception H5::PropListIException
+///\par Description
+/// For detail, please refer to the C layer Reference Manual at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSmallData
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+void DSetMemXferPropList::setSmallDataBlockSize(hsize_t size)
+{
+ herr_t ret_value = H5Pset_small_data_block_size(id, size);
+ if (ret_value < 0)
+ {
+ throw PropListIException("DSetMemXferPropList::setSmallDataBlockSize",
+ "H5Pset_small_data_block_size failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::getSmallDataBlockSize
+///\brief Returns the current small data block size setting.
+///\return Size of the small data block, in bytes
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+hsize_t DSetMemXferPropList::getSmallDataBlockSize()
+{
+ hsize_t size;
+ herr_t ret_value = H5Pget_small_data_block_size(id, &size);
+ if (ret_value < 0)
+ {
+ throw PropListIException("DSetMemXferPropList::getSmallDataBlockSize",
+ "H5Pget_small_data_block_size failed");
+ }
+ return(size);
+}
+
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::setHyperVectorSize
+///\brief Sets number of I/O vectors to be read/written in hyperslab I/O.
+///\exception H5::PropListIException
+///\par Description
+/// For information, please refer to the C layer Reference
+/// Manual at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetHyperVectorSize
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+void DSetMemXferPropList::setHyperVectorSize(size_t vector_size)
+{
+ herr_t ret_value = H5Pset_hyper_vector_size(id, vector_size);
+ if (ret_value < 0)
+ {
+ throw PropListIException("DSetMemXferPropList::setHyperVectorSize",
+ "H5Pset_hyper_vector_size failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::getSmallDataBlockSize
+///\brief Returns the number of I/O vectors to be read/written in
+/// hyperslab I/O.
+///\return Number of I/O vectors
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+size_t DSetMemXferPropList::getHyperVectorSize()
+{
+ size_t vector_size;
+ herr_t ret_value = H5Pget_hyper_vector_size(id, &vector_size);
+ if (ret_value < 0)
+ {
+ throw PropListIException("DSetMemXferPropList::getHyperVectorSize",
+ "H5Pget_hyper_vector_size failed");
+ }
+ return(vector_size);
+}
+
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::setEDCCheck
+///\brief Enables or disables error-detecting for a dataset reading
+/// process.
+///\param check - IN: Specifies whether error detection is enabled or
+/// disabled
+///\exception H5::PropListIException
+///\par Description
+/// The error detection algorithm used is the algorithm previously
+/// specified in the corresponding dataset creation property
+/// list. This function does not affect the use of error
+/// detection in the writing process.
+///\par
+/// Valid values are as follows:
+/// \li \c H5Z_ENABLE_EDC (default)
+/// \li \c H5Z_DISABLE_EDC
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+void DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check)
+{
+ herr_t ret_value = H5Pset_edc_check(id, check);
+ if (ret_value < 0)
+ {
+ throw PropListIException("DSetMemXferPropList::setEDCCheck",
+ "H5Pset_edc_check failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: DSetMemXferPropList::getEDCCheck
+///\brief Determines whether error-detection is enabled for dataset reads.
+///\return \c H5Z_ENABLE_EDC or \c H5Z_DISABLE_EDC
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - April, 2004
+//--------------------------------------------------------------------------
+H5Z_EDC_t DSetMemXferPropList::getEDCCheck()
+{
+ H5Z_EDC_t check = H5Pget_edc_check(id);
+ if (check < 0)
+ {
+ throw PropListIException("DSetMemXferPropList::getEDCCheck",
+ "H5Pget_edc_check failed");
+ }
+ return(check);
+}
// Default destructor
DSetMemXferPropList::~DSetMemXferPropList() {}
@@ -199,3 +320,4 @@ DSetMemXferPropList::~DSetMemXferPropList() {}
#ifndef H5_NO_NAMESPACE
} // end namespace
#endif
+