00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef H5P_PACKAGE
00025 #error "Do not include this file outside the H5P package!"
00026 #endif
00027
00028 #ifndef _H5Ppkg_H
00029 #define _H5Ppkg_H
00030
00031
00032 #include "H5Pprivate.h"
00033
00034
00035 #include "H5SLprivate.h"
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 typedef enum {
00048 H5P_PROP_WITHIN_UNKNOWN=0,
00049 H5P_PROP_WITHIN_LIST,
00050 H5P_PROP_WITHIN_CLASS
00051 } H5P_prop_within_t;
00052
00053
00054 typedef enum {
00055 H5P_MOD_ERR=(-1),
00056 H5P_MOD_INC_CLS,
00057 H5P_MOD_DEC_CLS,
00058 H5P_MOD_INC_LST,
00059 H5P_MOD_DEC_LST,
00060 H5P_MOD_INC_REF,
00061 H5P_MOD_DEC_REF,
00062 H5P_MOD_MAX
00063 } H5P_class_mod_t;
00064
00065
00066 typedef struct H5P_genprop_t {
00067
00068 char *name;
00069 size_t size;
00070 void *value;
00071 H5P_prop_within_t type;
00072 hbool_t shared_name;
00073
00074
00075 H5P_prp_create_func_t create;
00076 H5P_prp_set_func_t set;
00077 H5P_prp_get_func_t get;
00078 H5P_prp_delete_func_t del;
00079 H5P_prp_copy_func_t copy;
00080 H5P_prp_compare_func_t cmp;
00081 H5P_prp_close_func_t close;
00082 } H5P_genprop_t;
00083
00084
00085 struct H5P_genclass_t {
00086 struct H5P_genclass_t *parent;
00087 char *name;
00088 size_t nprops;
00089 unsigned plists;
00090 unsigned classes;
00091 unsigned ref_count;
00092 hbool_t internal;
00093 hbool_t deleted;
00094 unsigned revision;
00095 H5SL_t *props;
00096
00097
00098 H5P_cls_create_func_t create_func;
00099 void *create_data;
00100 H5P_cls_copy_func_t copy_func;
00101 void *copy_data;
00102 H5P_cls_close_func_t close_func;
00103 void *close_data;
00104 };
00105
00106
00107 struct H5P_genplist_t {
00108 H5P_genclass_t *pclass;
00109 hid_t plist_id;
00110 size_t nprops;
00111 hbool_t class_init;
00112 H5SL_t *del;
00113 H5SL_t *props;
00114 };
00115
00116
00117 typedef herr_t (*H5P_init_class_op_t)(H5P_genclass_t *pclass);
00118 typedef herr_t (*H5P_reg_prop_func_t)(H5P_genclass_t *pclass);
00119
00120
00121
00122
00123
00124 typedef struct H5P_libclass_t {
00125 const char *name;
00126
00127 hid_t const * const par_class_id;
00128 hid_t * const class_id;
00129 hid_t * const def_plist_id;
00130 H5P_reg_prop_func_t reg_prop_func;
00131
00132
00133 H5P_cls_create_func_t create_func;
00134 void *create_data;
00135 H5P_cls_copy_func_t copy_func;
00136 void *copy_data;
00137 H5P_cls_close_func_t close_func;
00138 void *close_data;
00139 } H5P_libclass_t;
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 H5_DLL H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class,
00153 const char *name, unsigned internal,
00154 H5P_cls_create_func_t cls_create, void *create_data,
00155 H5P_cls_copy_func_t cls_copy, void *copy_data,
00156 H5P_cls_close_func_t cls_close, void *close_data);
00157 H5_DLL H5P_genclass_t *H5P_copy_pclass(H5P_genclass_t *pclass);
00158 H5_DLL herr_t H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size,
00159 const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
00160 H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete,
00161 H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp,
00162 H5P_prp_close_func_t prp_close);
00163 H5_DLL herr_t H5P_register(H5P_genclass_t **pclass, const char *name, size_t size,
00164 const void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set,
00165 H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_delete,
00166 H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp,
00167 H5P_prp_close_func_t prp_close);
00168 H5_DLL herr_t H5P_add_prop(H5SL_t *props, H5P_genprop_t *prop);
00169 H5_DLL herr_t H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod);
00170 H5_DLL htri_t H5P_exist_pclass(H5P_genclass_t *pclass, const char *name);
00171 H5_DLL herr_t H5P_get_size_plist(H5P_genplist_t *plist, const char *name,
00172 size_t *size);
00173 H5_DLL herr_t H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name,
00174 size_t *size);
00175 H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
00176 H5_DLL herr_t H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops);
00177 H5_DLL int H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
00178 H5_DLL int H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2);
00179 H5_DLL int H5P_iterate_plist(hid_t plist_id, int *idx, H5P_iterate_t iter_func,
00180 void *iter_data);
00181 H5_DLL int H5P_iterate_pclass(hid_t pclass_id, int *idx, H5P_iterate_t iter_func,
00182 void *iter_data);
00183 H5_DLL herr_t H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name);
00184 H5_DLL herr_t H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name);
00185 H5_DLL herr_t H5P_unregister(H5P_genclass_t *pclass, const char *name);
00186 H5_DLL char *H5P_get_class_path(H5P_genclass_t *pclass);
00187 H5_DLL H5P_genclass_t *H5P_open_class_path(const char *path);
00188 H5_DLL H5P_genclass_t *H5P_get_class_parent(const H5P_genclass_t *pclass);
00189 H5_DLL herr_t H5P_close_class(void *_pclass);
00190 H5_DLL herr_t H5P_get_filter(const H5Z_filter_info_t *filter,
00191 unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
00192 size_t namelen, char name[], unsigned *filter_config);
00193
00194
00195 #ifdef H5P_TESTING
00196 H5_DLL char *H5P_get_class_path_test(hid_t pclass_id);
00197 H5_DLL hid_t H5P_open_class_path_test(const char *path);
00198 H5_DLL herr_t H5P_reset_external_file_test(hid_t dcpl_id);
00199 #endif
00200
00201 #endif
00202