diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-03-07 14:21:12 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-03-07 14:21:12 (GMT) |
commit | a318d2846c5e6f5cef635c8aa1e54d004aa33ff7 (patch) | |
tree | 13e44b533da59e542effa39603c831c73b359a85 /src/H5VLpublic.h | |
parent | d7147ff0eca5df777e2d9371aca7d1d98cbe45b4 (diff) | |
download | hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.zip hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.tar.gz hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.tar.bz2 |
[svn-r22032] - move all HDF5 library access for H5F routines to the native layer, higher layer only handle ids
- create a high level user id to return to users to hold vol id and object id
- all H5 callbacks implemented except for get_object_count/ids
- some bug fixes, test suite fails for now pending update to user ids of other objects
Diffstat (limited to 'src/H5VLpublic.h')
-rw-r--r-- | src/H5VLpublic.h | 113 |
1 files changed, 52 insertions, 61 deletions
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h index bf77239..9a800fe 100644 --- a/src/H5VLpublic.h +++ b/src/H5VLpublic.h @@ -24,92 +24,85 @@ #include "H5Fpublic.h" #include "H5Lpublic.h" -#define H5VL_VOL_DEFAULT 0 /* Default VOL plugin value */ +/* types for all file get API routines */ +typedef enum H5VL_file_get_t { + H5F_GET_FAPL = 0, /*file access property list */ + H5F_GET_FCPL = 1, /*file creation property list */ + H5F_GET_SIZE = 2, /*file size */ + H5F_GET_FREE_SPACE = 3, /*file freespace */ + H5F_GET_INFO = 4, /*file info */ + H5F_GET_INTENT = 5, /*file intent */ + H5F_GET_NAME = 6, /*file name */ + H5F_GET_OBJ_COUNT = 7, /*object count in file */ + H5F_GET_OBJ_IDS = 8, /*object ids in file */ + H5F_GET_VFD_HANDLE = 9, /*file VFD handle */ + H5F_GET_MDC_CONF = 10, /*file metadata cache configuration */ + H5F_GET_MDC_HR = 11, /*file metadata cache hit rate */ + H5F_GET_MDC_SIZE = 12, /*file metadata cache size */ + H5F_GET_FREE_SECTIONS = 13 /*file free selections */ +} H5VL_file_get_t; -/* general routines common to all HDF5 objects */ -typedef struct H5VL_general_class_t { - hid_t (*open) (hid_t obj_id, const char * object_name, hid_t plist_id); - hid_t (*create) (hid_t obj_id, const char *object_name, hid_t type_id, size_t size_hint, hid_t space_id, - hid_t plist_id1, hid_t plist_id2, hid_t plist_id3); - htri_t (*exists) (hid_t id, const char *obj_name, const char *name, hid_t lapl_id); - herr_t (*close) (hid_t obj_id); -} H5VL_general_class_t; +#define H5VL_VOL_DEFAULT 0 /* Default VOL plugin value */ /* H5F routines */ typedef struct H5VL_file_class_t { - H5F_t *(*open) (const char *name, unsigned flags, hid_t fcpl_id, - hid_t fapl_id, hid_t dxpl_id); - herr_t (*close) (H5F_t *file); - H5F_t *(*create) (const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id); - herr_t (*flush) (hid_t object_id, H5F_scope_t scope); - htri_t (*is_hdf5) (const char *name); - herr_t (*mount) (hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id); - herr_t (*unmount) (hid_t loc_id, const char *name); - hid_t (*reopen) (hid_t file_id); + hid_t (*open) (const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id); + herr_t (*close) (hid_t file_id); + hid_t (*create)(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id); + herr_t (*flush) (hid_t file_id, H5F_scope_t scope); + herr_t (*get) (hid_t file_id, H5VL_file_get_t get_type, void *data, int argc, void **argv); } H5VL_file_class_t; /* H5D routines */ typedef struct H5VL_dataset_class_t { - herr_t (*read) (hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, - hid_t xfer_plist_id, void * buf ); - herr_t (*write) (hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, + hid_t (*open) (hid_t loc_id, const char *name, hid_t dapl_id); + herr_t (*close) (hid_t dataset_id); + hid_t (*create)(hid_t loc_id, const char *name, hid_t dtype_id, hid_t space_id, + hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id); + herr_t (*read) (hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, + hid_t xfer_plist_id, void * buf); + herr_t (*write) (hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, const void * buf ); - herr_t (*set_extent) (hid_t dset_id, const hsize_t size[] ); + herr_t (*extend)(hid_t dset_id, const hsize_t size[] ); } H5VL_dataset_class_t; /* H5A routines */ typedef struct H5VL_attribute_class_t { - hid_t (*create_by_name) (hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, - hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id); - herr_t (*delete) (hid_t loc_id, const char *attr_name); - herr_t (*delete_by_idx) (hid_t loc_id, const char *obj_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t n, hid_t lapl_id ); - herr_t (*delete_by_name) (hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id); - hid_t (*open_by_idx) (hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, - hsize_t n, hid_t aapl_id, hid_t lapl_id ); - hid_t (*open_by_name) (hid_t loc_id, const char *obj_name, const char *attr_name, - hid_t aapl_id, hid_t lapl_id ); - hid_t (*open_idx) (hid_t loc_id, unsigned int idx ); - herr_t (*read) (hid_t attr_id, hid_t mem_type_id, void *buf ); - herr_t (*write) (hid_t attr_id, hid_t mem_type_id, const void *buf ); - herr_t (*rename) (hid_t loc_id, const char *obj_name, const char *old_attr_name, - const char *new_attr_name, hid_t lapl_id); + hid_t (*open) (hid_t obj_id, const char *attr_name, hid_t aapl_id); + herr_t (*close) (hid_t attr_id); + hid_t (*create)( hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, + hid_t acpl_id, hid_t aapl_id); + herr_t (*delete)(hid_t loc_id, const char *attr_name ); + herr_t (*read) (hid_t attr_id, hid_t mem_type_id, void *buf ); + herr_t (*write) (hid_t attr_id, hid_t mem_type_id, + const void *buf ); } H5VL_attribute_class_t; /* H5T routines*/ typedef struct H5VL_datatype_class_t { - hid_t (*commit) (hid_t loc_id, const char *name, hid_t type_id, - hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id); + hid_t (*open) (hid_t loc_id, const char * name, hid_t tapl_id); }H5VL_datatype_class_t; /* H5L routines */ typedef struct H5VL_link_class_t { - herr_t (*create) (hid_t obj_id, const char *name, hid_t loc_id, const char *link_name, + herr_t (*create) (hid_t obj_id, const char *name, hid_t loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id); herr_t (*delete) (hid_t loc_id, const char *name, hid_t lapl_id); - herr_t (*move) (hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dest_name, - hid_t lcpl, hid_t lapl); - herr_t (*copy) (hid_t src_loc_id, const char *src_name, hid_t dest_loc_id, const char *dest_name, - hid_t lcpl_id, hid_t lapl_id); - herr_t (*delete_by_idx) (hid_t loc_id, const char *group_name, H5_index_t index_field, - H5_iter_order_t order, hsize_t n, hid_t lapl_id); - herr_t (*create_external) (const char *target_file_name, const char *target_obj_name, - hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id); - herr_t (*create_ud) (hid_t link_loc_id, const char *link_name, H5L_type_t link_type, - const char *udata, size_t udata_size, hid_t lcpl_id, hid_t lapl_id); - + herr_t (*move) (hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, + const char *dest_name, hid_t lcpl, hid_t lapl); + herr_t (*copy) (hid_t src_loc_id, const char *src_name, hid_t dest_loc_id, + const char *dest_name, hid_t lcpl_id, hid_t lapl_id); } H5VL_link_class_t; /* H5O routines */ typedef struct H5VL_object_class_t { - herr_t (*set_comment) (hid_t object_id, const char *name, const char *comment, hid_t lapl_id); - hid_t (*open_by_addr) (hid_t loc_id, haddr_t addr ); - hid_t (*open_by_idx) (hid_t loc_id, const char *group_name, H5_index_t index_type, - H5_iter_order_t order, hsize_t n, hid_t lapl_id ); - herr_t (*copy) (hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, - hid_t ocpypl_id, hid_t lcpl_id ); - herr_t (*incr_refcount) (hid_t object_id ); - herr_t (*decr_refcount) (hid_t object_id ); + hid_t (*create)(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id); + hid_t (*open) (hid_t loc_id, const char *name, hid_t lapl_id); + herr_t (*close) (hid_t obj_id); + herr_t (*move) (hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, + const char *dest_name, hid_t lcpl, hid_t lapl); + herr_t (*copy) (hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, + hid_t ocpypl_id, hid_t lcpl_id ); } H5VL_object_class_t; /* Class information for each VOL driver */ @@ -120,7 +113,6 @@ typedef struct H5VL_class_t { void * (*fapl_get)(H5F_t *file); void * (*fapl_copy)(const void *fapl); herr_t (*fapl_free)(void *fapl); - H5VL_general_class_t general_cls; H5VL_file_class_t file_cls; H5VL_dataset_class_t dataset_cls; H5VL_attribute_class_t attribute_cls; @@ -129,7 +121,6 @@ typedef struct H5VL_class_t { H5VL_object_class_t object_cls; } H5VL_class_t; - /* Function prototypes */ H5_DLL hid_t H5VLregister(const H5VL_class_t *cls); H5_DLL herr_t H5VLunregister(hid_t driver_id); |