summaryrefslogtreecommitdiffstats
path: root/c++/src/H5DxferProp.cpp
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-04-27 19:16:35 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-04-27 19:16:35 (GMT)
commit85b599e9332c1d7d6f454425b66ad43e78954814 (patch)
tree569f6dc4c55759da189280c4c49966052ed81b1a /c++/src/H5DxferProp.cpp
parent4fa0c3f5bc09d0948e1dde9c3ed3ebc700109936 (diff)
downloadhdf5-85b599e9332c1d7d6f454425b66ad43e78954814.zip
hdf5-85b599e9332c1d7d6f454425b66ad43e78954814.tar.gz
hdf5-85b599e9332c1d7d6f454425b66ad43e78954814.tar.bz2
[svn-r8423] Purpose: New feature
Description: A new exception handler for datatype conversion(set through H5Pset_type_conv_cb) to replace the old overflow callback function(set through H5Tset_overflow). This new handler can deal with overflow, precision loss and fraction truncate during datatype conversion. Platforms tested: h5committest Misc. update: release_docs
Diffstat (limited to 'c++/src/H5DxferProp.cpp')
-rw-r--r--c++/src/H5DxferProp.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp
index 8a7b06c..0c0b0db 100644
--- a/c++/src/H5DxferProp.cpp
+++ b/c++/src/H5DxferProp.cpp
@@ -104,6 +104,30 @@ 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
{