diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:29:53 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:29:53 (GMT) |
commit | ec8ad09125032c9c232878d02e90aa86df162841 (patch) | |
tree | 5d63105d3a0db7d5bbee41c5b74b097649a2115e /src/H5Pprivate.h | |
parent | 453238e90e1574ef1c15e3c79f7fb3d77920e77c (diff) | |
download | hdf5-ec8ad09125032c9c232878d02e90aa86df162841.zip hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.gz hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.bz2 |
Source formatted
Diffstat (limited to 'src/H5Pprivate.h')
-rw-r--r-- | src/H5Pprivate.h | 153 |
1 files changed, 72 insertions, 81 deletions
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 460e16b..a89eec9 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -24,60 +24,59 @@ typedef struct H5P_genplist_t H5P_genplist_t; #include "H5Ppublic.h" /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ /**************************/ /* Library Private Macros */ /**************************/ /* ======== String creation property names ======== */ -#define H5P_STRCRT_CHAR_ENCODING_NAME "character_encoding" /* Character set encoding for string */ +#define H5P_STRCRT_CHAR_ENCODING_NAME "character_encoding" /* Character set encoding for string */ /* If the module using this macro is allowed access to the private variables, access them directly */ #ifdef H5P_MODULE -#define H5P_PLIST_ID(P) ((P)->plist_id) -#define H5P_CLASS(P) ((P)->pclass) +#define H5P_PLIST_ID(P) ((P)->plist_id) +#define H5P_CLASS(P) ((P)->pclass) #else /* H5P_MODULE */ -#define H5P_PLIST_ID(P) (H5P_get_plist_id(P)) -#define H5P_CLASS(P) (H5P_get_class(P)) +#define H5P_PLIST_ID(P) (H5P_get_plist_id(P)) +#define H5P_CLASS(P) (H5P_get_class(P)) #endif /* H5P_MODULE */ #define H5_COLL_MD_READ_FLAG_NAME "collective_metadata_read" - /****************************/ /* Library Private Typedefs */ /****************************/ typedef enum H5P_coll_md_read_flag_t { - H5P_FORCE_FALSE = -1, - H5P_USER_FALSE = 0, - H5P_USER_TRUE = 1 + H5P_FORCE_FALSE = -1, + H5P_USER_FALSE = 0, + H5P_USER_TRUE = 1 } H5P_coll_md_read_flag_t; /* Forward declarations for anonymous H5P objects */ typedef struct H5P_genclass_t H5P_genclass_t; typedef enum H5P_plist_type_t { - H5P_TYPE_USER = 0, - H5P_TYPE_ROOT = 1, - H5P_TYPE_OBJECT_CREATE = 2, - H5P_TYPE_FILE_CREATE = 3, - H5P_TYPE_FILE_ACCESS = 4, - H5P_TYPE_DATASET_CREATE = 5, - H5P_TYPE_DATASET_ACCESS = 6, - H5P_TYPE_DATASET_XFER = 7, - H5P_TYPE_FILE_MOUNT = 8, - H5P_TYPE_GROUP_CREATE = 9, - H5P_TYPE_GROUP_ACCESS = 10, - H5P_TYPE_DATATYPE_CREATE = 11, - H5P_TYPE_DATATYPE_ACCESS = 12, - H5P_TYPE_STRING_CREATE = 13, - H5P_TYPE_ATTRIBUTE_CREATE = 14, - H5P_TYPE_OBJECT_COPY = 15, - H5P_TYPE_LINK_CREATE = 16, - H5P_TYPE_LINK_ACCESS = 17, - H5P_TYPE_ATTRIBUTE_ACCESS = 18, + H5P_TYPE_USER = 0, + H5P_TYPE_ROOT = 1, + H5P_TYPE_OBJECT_CREATE = 2, + H5P_TYPE_FILE_CREATE = 3, + H5P_TYPE_FILE_ACCESS = 4, + H5P_TYPE_DATASET_CREATE = 5, + H5P_TYPE_DATASET_ACCESS = 6, + H5P_TYPE_DATASET_XFER = 7, + H5P_TYPE_FILE_MOUNT = 8, + H5P_TYPE_GROUP_CREATE = 9, + H5P_TYPE_GROUP_ACCESS = 10, + H5P_TYPE_DATATYPE_CREATE = 11, + H5P_TYPE_DATATYPE_ACCESS = 12, + H5P_TYPE_STRING_CREATE = 13, + H5P_TYPE_ATTRIBUTE_CREATE = 14, + H5P_TYPE_OBJECT_COPY = 15, + H5P_TYPE_LINK_CREATE = 16, + H5P_TYPE_LINK_ACCESS = 17, + H5P_TYPE_ATTRIBUTE_ACCESS = 18, H5P_TYPE_MAX_TYPE } H5P_plist_type_t; @@ -94,22 +93,22 @@ typedef herr_t (*H5P_prp_decode_func_t)(const void **buf, void *value); * class variables and methods used to initialize the class. */ typedef struct H5P_libclass_t { - const char *name; /* Class name */ - H5P_plist_type_t type; /* Class type */ + const char * name; /* Class name */ + H5P_plist_type_t type; /* Class type */ - H5P_genclass_t * * par_pclass; /* Pointer to global parent class property list class */ - H5P_genclass_t * * pclass; /* Pointer to global property list class */ - hid_t * const class_id; /* Pointer to global property list class ID */ - hid_t * const def_plist_id; /* Pointer to global default property list ID */ - H5P_reg_prop_func_t reg_prop_func; /* Register class's properties */ + H5P_genclass_t ** par_pclass; /* Pointer to global parent class property list class */ + H5P_genclass_t ** pclass; /* Pointer to global property list class */ + hid_t *const class_id; /* Pointer to global property list class ID */ + hid_t *const def_plist_id; /* Pointer to global default property list ID */ + H5P_reg_prop_func_t reg_prop_func; /* Register class's properties */ /* Class callback function pointers & info */ - H5P_cls_create_func_t create_func; /* Function to call when a property list is created */ - void *create_data; /* Pointer to user data to pass along to create callback */ - H5P_cls_copy_func_t copy_func; /* Function to call when a property list is copied */ - void *copy_data; /* Pointer to user data to pass along to copy callback */ - H5P_cls_close_func_t close_func; /* Function to call when a property list is closed */ - void *close_data; /* Pointer to user data to pass along to close callback */ + H5P_cls_create_func_t create_func; /* Function to call when a property list is created */ + void * create_data; /* Pointer to user data to pass along to create callback */ + H5P_cls_copy_func_t copy_func; /* Function to call when a property list is copied */ + void * copy_data; /* Pointer to user data to pass along to copy callback */ + H5P_cls_close_func_t close_func; /* Function to call when a property list is closed */ + void * close_data; /* Pointer to user data to pass along to close callback */ } H5P_libclass_t; /*****************************/ @@ -137,14 +136,14 @@ H5_DLLVAR H5P_genclass_t *H5P_CLS_LINK_ACCESS_g; H5_DLLVAR H5P_genclass_t *H5P_CLS_STRING_CREATE_g; /* Internal property list classes */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_LCRT[1]; /* Link creation */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_LACC[1]; /* Link access */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_AACC[1]; /* Attribute access */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_DACC[1]; /* Dataset access */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_GACC[1]; /* Group access */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_TACC[1]; /* Named datatype access */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_FACC[1]; /* File access */ -H5_DLLVAR const struct H5P_libclass_t H5P_CLS_OCPY[1]; /* Object copy */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_LCRT[1]; /* Link creation */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_LACC[1]; /* Link access */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_AACC[1]; /* Attribute access */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_DACC[1]; /* Dataset access */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_GACC[1]; /* Group access */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_TACC[1]; /* Named datatype access */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_FACC[1]; /* File access */ +H5_DLLVAR const struct H5P_libclass_t H5P_CLS_OCPY[1]; /* Object copy */ /******************************/ /* Library Private Prototypes */ @@ -159,43 +158,38 @@ H5_DLL herr_t H5P_init(void); /* Internal versions of API routines */ H5_DLL herr_t H5P_close(void *_plist); -H5_DLL hid_t H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref); -H5_DLL hid_t H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref); +H5_DLL hid_t H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref); +H5_DLL hid_t H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref); H5_DLL herr_t H5P_get(H5P_genplist_t *plist, const char *name, void *value); H5_DLL herr_t H5P_set(H5P_genplist_t *plist, const char *name, const void *value); H5_DLL herr_t H5P_peek(H5P_genplist_t *plist, const char *name, void *value); H5_DLL herr_t H5P_poke(H5P_genplist_t *plist, const char *name, const void *value); -H5_DLL herr_t H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, - void *value, 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_insert(H5P_genplist_t *plist, const char *name, size_t size, void *value, + 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_remove(H5P_genplist_t *plist, const char *name); H5_DLL htri_t H5P_exist_plist(const H5P_genplist_t *plist, const char *name); H5_DLL htri_t H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2); -H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass); +H5_DLL char * H5P_get_class_name(H5P_genclass_t *pclass); /* Internal helper routines */ -H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, - hbool_t recurse); -H5_DLL hid_t H5P_peek_driver(H5P_genplist_t *plist); +H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops, hbool_t recurse); +H5_DLL hid_t H5P_peek_driver(H5P_genplist_t *plist); H5_DLL const void *H5P_peek_driver_info(H5P_genplist_t *plist); -H5_DLL herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, - const void *new_driver_info); -H5_DLL herr_t H5P_set_vlen_mem_manager(H5P_genplist_t *plist, - H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func, - void *free_info); -H5_DLL herr_t H5P_is_fill_value_defined(const struct H5O_fill_t *fill, - H5D_fill_value_t *status); -H5_DLL int H5P_fill_value_cmp(const void *value1, const void *value2, - size_t size); -H5_DLL herr_t H5P_modify_filter(H5P_genplist_t *plist, H5Z_filter_t filter, - unsigned flags, size_t cd_nelmts, const unsigned cd_values[]); -H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id, - unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], - size_t namelen, char name[], unsigned *filter_config); +H5_DLL herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id, const void *new_driver_info); +H5_DLL herr_t H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void *alloc_info, + H5MM_free_t free_func, void *free_info); +H5_DLL herr_t H5P_is_fill_value_defined(const struct H5O_fill_t *fill, H5D_fill_value_t *status); +H5_DLL int H5P_fill_value_cmp(const void *value1, const void *value2, size_t size); +H5_DLL herr_t H5P_modify_filter(H5P_genplist_t *plist, H5Z_filter_t filter, unsigned flags, size_t cd_nelmts, + const unsigned cd_values[]); +H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id, unsigned int *flags, + size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], + unsigned *filter_config); H5_DLL htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id); -H5_DLL hid_t H5P_get_default(const H5P_libclass_t *pclass); +H5_DLL hid_t H5P_get_default(const H5P_libclass_t *pclass); /* Query internal fields of the property list struct */ H5_DLL hid_t H5P_get_plist_id(const H5P_genplist_t *plist); @@ -206,10 +200,7 @@ H5_DLL htri_t H5P_isa_class(hid_t plist_id, hid_t pclass_id); H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id); /* Private DCPL routines */ -H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist, - H5D_fill_value_t *status); -H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, const struct H5T_t *type, - void *value); +H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status); +H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, const struct H5T_t *type, void *value); #endif /* _H5Pprivate_H */ - |