summaryrefslogtreecommitdiffstats
path: root/src/H5Sprivate.h
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2015-10-02 20:24:29 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2015-10-02 20:24:29 (GMT)
commit87cc068ccbc761a473bbe8d211a40383c0933db0 (patch)
tree5ee6aebbe944f3460b0ca8acb3922cf01bad387b /src/H5Sprivate.h
parentb991b71176e27f3d4ad0c9ddedfaadd9e232d831 (diff)
downloadhdf5-87cc068ccbc761a473bbe8d211a40383c0933db0.zip
hdf5-87cc068ccbc761a473bbe8d211a40383c0933db0.tar.gz
hdf5-87cc068ccbc761a473bbe8d211a40383c0933db0.tar.bz2
[svn-r27939] Remove H5D__iterate and use H5S_select_iterate directly
Add internal library callback to H5S_select_iterate to avoid having to pass hid_t objects internally
Diffstat (limited to 'src/H5Sprivate.h')
-rw-r--r--src/H5Sprivate.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index b6b974d..ff6955c 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -31,6 +31,7 @@
#include "H5Gprivate.h" /* Groups */
#include "H5Oprivate.h" /* Object headers */
#include "H5Pprivate.h" /* Property lists */
+#include "H5Tprivate.h" /* Datatypes */
/* Flags for H5S_find */
#define H5S_CONV_PAR_IO_POSSIBLE 0x0001
@@ -115,6 +116,29 @@ typedef struct H5S_sel_iter_t {
} u;
} H5S_sel_iter_t;
+/* Selection iteration operator for internal library callbacks */
+typedef herr_t (*H5S_sel_iter_lib_op_t)(void *elem, const H5T_t *type,
+ unsigned ndim, const hsize_t *point, void *op_data);
+
+/* Describe kind of callback to make */
+typedef enum H5S_sel_iter_op_type_t {
+ H5S_SEL_ITER_OP_APP, /* Application callback */
+ H5S_SEL_ITER_OP_LIB /* Library internal callback */
+} H5S_sel_iter_op_type_t;
+
+typedef struct H5S_sel_iter_app_op_t {
+ H5D_operator_t op; /* Callback */
+ hid_t type_id; /* Type ID to be passed to callback */
+} H5S_sel_iter_app_op_t;
+
+typedef struct H5S_sel_iter_op_t {
+ H5S_sel_iter_op_type_t op_type;
+ union {
+ H5S_sel_iter_app_op_t app_op; /* Application callback */
+ H5S_sel_iter_lib_op_t lib_op; /* Library internal callback */
+ } u;
+} H5S_sel_iter_op_t;
+
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5S_MODULE
#define H5S_GET_EXTENT_TYPE(S) ((S)->extent.type)
@@ -211,8 +235,8 @@ H5_DLL herr_t H5S_extent_copy(H5S_t *dst, const H5S_t *src);
/* Operations on selections */
H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p);
H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space);
-H5_DLL herr_t H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space,
- H5D_operator_t op, void *operator_data);
+H5_DLL herr_t H5S_select_iterate(void *buf, const H5T_t *type, const H5S_t *space,
+ const H5S_sel_iter_op_t *op, void *op_data);
H5_DLL herr_t H5S_select_fill(const void *fill, size_t fill_size,
const H5S_t *space, void *buf);
H5_DLL htri_t H5S_select_valid(const H5S_t *space);