summaryrefslogtreecommitdiffstats
path: root/src/H5B2private.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-01 16:45:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-01 16:45:27 (GMT)
commit71a9d507255366be01c25e458ac4c953d4481f45 (patch)
tree511f2662e8cc85010434af4a64812da147848317 /src/H5B2private.h
parent1bc79f977be67f734a44fd237be6f05b5fb25f53 (diff)
downloadhdf5-71a9d507255366be01c25e458ac4c953d4481f45.zip
hdf5-71a9d507255366be01c25e458ac4c953d4481f45.tar.gz
hdf5-71a9d507255366be01c25e458ac4c953d4481f45.tar.bz2
[svn-r17943] Description:
Finish refactoring v2 B-trees so that they can have client callback context provided to the encode/decode callbacks. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5B2private.h')
-rw-r--r--src/H5B2private.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/H5B2private.h b/src/H5B2private.h
index cfdf868..4880ab2 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -85,20 +85,17 @@ struct H5B2_class_t {
const char *name; /* Name of B-tree class, for debugging */
size_t nrec_size; /* Size of native (memory) record */
- /* Store record from application to B-tree 'native' form */
- herr_t (*store)(void *nrecord, const void *udata); /* Store record in native record table */
-
- /* Compare records, according to a key */
- herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */
-
- /* Encode & decode record values */
- herr_t (*encode)(const H5F_t *f, uint8_t *raw, const void *record); /* Encode record from native form to disk storage form */
- herr_t (*decode)(const H5F_t *f, const uint8_t *raw, void *record); /* Decode record from disk storage form to native form */
-
- /* Debug record values */
- herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */
- int indent, int fwidth, const void *record,
- const void *udata);
+ /* Extensible array client callback methods */
+ void *(*crt_context)(void *udata); /* Create context for other client callbacks */
+ herr_t (*dst_context)(void *ctx); /* Destroy client callback context */
+ herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */
+ herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */
+ herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */
+ herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */
+ herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */
+ int indent, int fwidth, const void *record, const void *udata);
+ void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */
+ herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */
};
/* v2 B-tree creation parameters */
@@ -128,8 +125,9 @@ typedef struct H5B2_t H5B2_t;
/***************************************/
/* Library-private Function Prototypes */
/***************************************/
-H5_DLL H5B2_t *H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam);
-H5_DLL H5B2_t *H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+H5_DLL H5B2_t *H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
+ void *ctx_udata);
+H5_DLL H5B2_t *H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata);
H5_DLL herr_t H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr/*out*/);
H5_DLL herr_t H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata);
H5_DLL herr_t H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op,
@@ -151,7 +149,7 @@ H5_DLL herr_t H5B2_size(H5B2_t *bt2, hid_t dxpl_id,
hsize_t *btree_size);
H5_DLL herr_t H5B2_close(H5B2_t *bt2, hid_t dxpl_id);
H5_DLL herr_t H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr,
- H5B2_remove_t op, void *op_data);
+ void *ctx_udata, H5B2_remove_t op, void *op_data);
/* Statistics routines */
H5_DLL herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info);