summaryrefslogtreecommitdiffstats
path: root/src/H5Oprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-05-23 02:16:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-05-23 02:16:41 (GMT)
commitc04a55d65e694b7c3e36813f48c24d43118f8e87 (patch)
tree545de5a9735eab1e44964c20c979565f0fa040d9 /src/H5Oprivate.h
parent2232cf942df7b81ce44888a33e91fbe7077a1f6b (diff)
downloadhdf5-c04a55d65e694b7c3e36813f48c24d43118f8e87.zip
hdf5-c04a55d65e694b7c3e36813f48c24d43118f8e87.tar.gz
hdf5-c04a55d65e694b7c3e36813f48c24d43118f8e87.tar.bz2
[svn-r13796] Description:
Clean up ISOHM code further and get rid of several non-optimal ways of working with object headers. Tested on: FreeBSD/32 6.2 (duty) Mac OS X/32 10.4.9 (amazon)
Diffstat (limited to 'src/H5Oprivate.h')
-rw-r--r--src/H5Oprivate.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 543f929..c4d2a1f 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -44,6 +44,7 @@
/* Forward references of package typedefs */
typedef struct H5O_msg_class_t H5O_msg_class_t;
+typedef struct H5O_mesg_t H5O_mesg_t;
typedef struct H5O_t H5O_t;
/* Values used to create the shared message & attribute heaps */
@@ -482,10 +483,27 @@ typedef uint32_t H5O_refcount_t; /* Contains # of links to object, if >1
typedef unsigned H5O_unknown_t; /* Original message type ID */
-/* Typedef for iteration operations */
+/* Typedef for "application" iteration operations */
typedef herr_t (*H5O_operator_t)(const void *mesg/*in*/, unsigned idx,
void *operator_data/*in,out*/);
+/* Typedef for "internal library" iteration operations */
+typedef herr_t (*H5O_lib_operator_t)(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
+ unsigned sequence, hbool_t *oh_modified/*out*/, void *operator_data/*in,out*/);
+
+/* Some syntactic sugar to make the compiler happy with two different kinds of iterator callbacks */
+typedef struct {
+ enum {
+ H5O_MESG_OP_APP, /* Application callback */
+ H5O_MESG_OP_LIB /* Library internal callback */
+ } op_type;
+ union {
+ H5O_operator_t app_op; /* Application callback for each message */
+ H5O_lib_operator_t lib_op; /* Library internal callback for each message */
+ } u;
+} H5O_mesg_operator_t;
+
+
/* Typedef for abstract object creation */
typedef struct {
H5O_type_t obj_type; /* Type of object to create */
@@ -538,8 +556,8 @@ H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequenc
hbool_t adj_link, hid_t dxpl_id);
H5_DLL herr_t H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence,
H5O_operator_t op, void *op_data, hbool_t adj_link, hid_t dxpl_id);
-H5_DLL herr_t H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id, H5O_operator_t op,
- void *op_data, hid_t dxpl_id);
+H5_DLL herr_t H5O_msg_iterate(const H5O_loc_t *loc, unsigned type_id,
+ const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id);
H5_DLL size_t H5O_msg_raw_size(const H5F_t *f, unsigned type_id,
hbool_t disable_shared, const void *mesg);
H5_DLL size_t H5O_msg_size_f(const H5F_t *f, hid_t ocpl_id, unsigned type_id,