summaryrefslogtreecommitdiffstats
path: root/src/H5Bprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-04-23 16:01:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-04-23 16:01:43 (GMT)
commitf99a4120573eb8bcededc20a91be8fa520d4ebfa (patch)
tree87fd804f59a537819fb669fecda5598d6e964fd6 /src/H5Bprivate.h
parentac917c1f07c0af2e8de40a841223f72a85eaa7ee (diff)
downloadhdf5-f99a4120573eb8bcededc20a91be8fa520d4ebfa.zip
hdf5-f99a4120573eb8bcededc20a91be8fa520d4ebfa.tar.gz
hdf5-f99a4120573eb8bcededc20a91be8fa520d4ebfa.tar.bz2
[svn-r5230] Purpose:
Code cleanup Description: Clean up the H5B_iterate code to not have a single hard-wired iterator for each interface which uses a B-tree, instead accept a function pointer which determines the callback function. This allows additional iterator callbacks to be defined without requiring additional H5B functions to be created. In that spirit, remove the H5B_prune_by_extent call and convert the H5F_istore callback routine for it into a callback routine for H5B_iterate. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Bprivate.h')
-rw-r--r--src/H5Bprivate.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index e6fc2ac..0d509d6 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -50,6 +50,10 @@ typedef enum H5B_ins_t {
H5B_INS_REMOVE = 5 /*remove current node */
} H5B_ins_t;
+/* Define the operator callback function pointer for H5B_iterate() */
+typedef herr_t (*H5B_operator_t)(H5F_t *f, void *_lt_key, haddr_t addr,
+ void *_rt_key, void *_udata);
+
/*
* Each class of object that can be pointed to by a B-link tree has a
* variable of this type that contains class variables and methods. Each
@@ -80,20 +84,11 @@ typedef struct H5B_class_t {
H5B_ins_t (*remove)(H5F_t*, haddr_t, void*, hbool_t*, void*, void*,
hbool_t*);
- /* iterate through the leaf nodes */
- herr_t (*list)(H5F_t*, void*, haddr_t, void*, void*);
-
/* encode, decode, debug key values */
herr_t (*decode)(H5F_t*, struct H5B_t*, uint8_t*, void*);
herr_t (*encode)(H5F_t*, struct H5B_t*, uint8_t*, void*);
herr_t (*debug_key)(FILE*, int, int, const void*, const void*);
- /*pvn */
-
- /* iterate through the leaf nodes, removing chunks upon H5Dset_extend request */
- herr_t (*prune_extent)( H5F_t *f, void *_lt_key, haddr_t addr,
- void *_udata, hsize_t *size );
-
} H5B_class_t;
/*
@@ -136,11 +131,8 @@ __DLL__ herr_t H5B_insert (H5F_t *f, const H5B_class_t *type, haddr_t addr,
const double split_ratios[], void *udata);
__DLL__ herr_t H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr,
void *udata);
-__DLL__ herr_t H5B_iterate (H5F_t *f, const H5B_class_t *type, haddr_t addr,
- void *udata);
+__DLL__ herr_t H5B_iterate (H5F_t *f, const H5B_class_t *type, H5B_operator_t
+ op, haddr_t addr, void *udata);
__DLL__ int H5B_Kvalue(H5F_t *f, const H5B_class_t *type);
-__DLL__ herr_t H5B_prune_by_extent( H5F_t *f, const H5B_class_t *type, haddr_t addr,
- void *udata, hsize_t *size );
-
#endif