diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-09-25 15:47:25 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-09-25 15:47:25 (GMT) |
commit | 6a89177036b5808ed0ce06ce0aab3af056b56984 (patch) | |
tree | 43367eb16716e1a2f074e2af07121e2723eae8d8 /src/H5Ppkg.h | |
parent | 50e3990f2a9e3bba421460d8d5cb21bb6f6e98fe (diff) | |
download | hdf5-6a89177036b5808ed0ce06ce0aab3af056b56984.zip hdf5-6a89177036b5808ed0ce06ce0aab3af056b56984.tar.gz hdf5-6a89177036b5808ed0ce06ce0aab3af056b56984.tar.bz2 |
[svn-r22807] Description:
Add encode/decode API routines for property lists: H5Pencode/H5Pdecode.
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, 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 (koala) 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, w/threadsafe, in production mode
Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (ember) w/Intel compilers, w/parallel, C++ & FORTRAN,
in production mode
Mac OS X/32 10.7.3 (amazon) in debug mode
Mac OS X/32 10.7.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.7.3 (amazon) w/parallel, in debug mode
Diffstat (limited to 'src/H5Ppkg.h')
-rw-r--r-- | src/H5Ppkg.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 7768eec..b4c2405 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -75,6 +75,8 @@ typedef struct H5P_genprop_t { H5P_prp_create_func_t create; /* Function to call when a property is created */ H5P_prp_set_func_t set; /* Function to call when a property value is set */ H5P_prp_get_func_t get; /* Function to call when a property value is retrieved */ + H5P_prp_encode_func_t encode; /* Function to call when a property is encoded */ + H5P_prp_decode_func_t decode; /* Function to call when a property is decoded */ H5P_prp_delete_func_t del; /* Function to call when a property is deleted */ H5P_prp_copy_func_t copy; /* Function to call when a property is copied */ H5P_prp_compare_func_t cmp; /* Function to call when a property is compared */ @@ -159,13 +161,17 @@ H5_DLL H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class, H5P_cls_close_func_t cls_close, void *close_data); H5_DLL H5P_genclass_t *H5P_copy_pclass(H5P_genclass_t *pclass); H5_DLL herr_t H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size, - const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, - H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, + const void *def_value, H5P_prp_create_func_t prp_create, + H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, + H5P_prp_encode_func_t prp_encode, H5P_prp_decode_func_t prp_decode, + H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close); H5_DLL herr_t H5P_register(H5P_genclass_t **pclass, const char *name, size_t size, - const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, - H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete, + const void *def_value, H5P_prp_create_func_t prp_create, + H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, + H5P_prp_encode_func_t prp_encode, H5P_prp_decode_func_t prp_decode, + H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close); H5_DLL herr_t H5P_add_prop(H5SL_t *props, H5P_genprop_t *prop); @@ -195,6 +201,24 @@ H5_DLL herr_t H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config); H5_DLL H5P_genprop_t *H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name); +H5_DLL hid_t H5P__new_plist_of_type(H5P_plist_type_t type); + +/* Encode/decode routines */ +H5_DLL herr_t H5P__encode(const H5P_genplist_t *plist, hbool_t enc_all_prop, + void *buf, size_t *nalloc); +H5_DLL hid_t H5P__decode(const void *buf); +H5_DLL herr_t H5P__encode_hsize_t(const void *value, uint8_t **pp, size_t *size); +H5_DLL herr_t H5P__encode_size_t(const void *value, uint8_t **pp, size_t *size); +H5_DLL herr_t H5P__encode_unsigned(const void *value, uint8_t **pp, size_t *size); +H5_DLL herr_t H5P__encode_uint8_t(const void *value, uint8_t **pp, size_t *size); +H5_DLL herr_t H5P__encode_hbool_t(const void *value, uint8_t **pp, size_t *size); +H5_DLL herr_t H5P__encode_double(const void *value, uint8_t **pp, size_t *size); +H5_DLL herr_t H5P__decode_hsize_t(const uint8_t **pp, void *value); +H5_DLL herr_t H5P__decode_size_t(const uint8_t **pp, void *value); +H5_DLL herr_t H5P__decode_unsigned(const uint8_t **pp, void *value); +H5_DLL herr_t H5P__decode_uint8_t(const uint8_t **pp, void *value); +H5_DLL herr_t H5P__decode_hbool_t(const uint8_t **pp, void *value); +H5_DLL herr_t H5P__decode_double(const uint8_t **pp, void *value); /* Testing functions */ #ifdef H5P_TESTING |