diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-07-25 17:35:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-07-25 17:35:17 (GMT) |
commit | 2c8c5f96924b1e143d6047b802eda1aed9003d1c (patch) | |
tree | 49d081a241a9fb61c66b2fd6676c2cdba5f57604 /src/H5Pprivate.h | |
parent | 2a14d16d805762296e53ab25a6bc8b6a39230c11 (diff) | |
download | hdf5-2c8c5f96924b1e143d6047b802eda1aed9003d1c.zip hdf5-2c8c5f96924b1e143d6047b802eda1aed9003d1c.tar.gz hdf5-2c8c5f96924b1e143d6047b802eda1aed9003d1c.tar.bz2 |
[svn-r2444] Checkpoint the Generic Property implementation. It's not active yet, but it's
close. This shouldn't interfere with other development work. (I think.. :-)
Diffstat (limited to 'src/H5Pprivate.h')
-rw-r--r-- | src/H5Pprivate.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 0e66841..4f5d16f 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -23,6 +23,65 @@ #include <H5Fprivate.h> #include <H5Dprivate.h> +/* Define enum for modifications to class */ +typedef enum { + H5P_MOD_ERR=(-1), /* Indicate an error */ + H5P_MOD_INC_CLS, /* Increment the dependant class count*/ + H5P_MOD_DEC_CLS, /* Decrement the dependant class count*/ + H5P_MOD_INC_LST, /* Increment the dependant list count*/ + H5P_MOD_DEC_LST, /* Decrement the dependant list count*/ + H5P_MOD_CHECK, /* Just check about deleting the class */ + H5P_MOD_MAX /* Upper limit on class modifications */ +} H5P_class_mod_t; + +/* Define structure to hold property information */ +typedef struct H5P_genprop_tag { + /* Values for this property */ + uintn xor; /* XOR'ed version of the name, for faster comparisons */ + char *name; /* Name of property */ + size_t size; /* Size of property value */ + void *value; /* Pointer to property value */ + + /* Callback function pointers & info */ + H5P_prp_create_func_t create; /* Function to call when a property is created */ + void *def_value; /* Pointer to default value to pass along to create callback */ + 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_close_func_t close; /* Function to call when a property is closed */ + + struct H5P_genprop_tag *next; /* Pointer to the next property in this list */ +} H5P_genprop_t; + +/* Define structure to hold class information */ +typedef struct H5P_genclass_tag { + struct H5P_genclass_tag *parent; /* Pointer to parent class */ + char *name; /* Name of property list class */ + uintn nprops; /* Number of properties in class */ + uintn hashsize; /* Hash table size */ + uintn plists; /* Number of property lists that have been created since the last modification to the class */ + uintn classes; /* Number of classes that have been derived since the last modification to the class */ + uintn internal:1; /* Whether this class is internal to the library or not */ + uintn deleted:1; /* Whether this class has been deleted and is waiting for dependent classes & proplists to close */ + + /* 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_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_genprop_t *props[1]; /* Hash table of pointers to properties in the class */ +} H5P_genclass_t; + +/* Define structure to hold property list information */ +typedef struct H5P_genplist_tag { + H5P_genclass_t *pclass; /* Pointer to class info */ + uintn nprops; /* Number of properties in class */ + uintn class_init:1; /* Whether the class initialization callback finished successfully */ + + /* Hash size for a property list is same as class */ + H5P_genprop_t *props[1]; /* Hash table of pointers to properties in the list */ +} H5P_genplist_t; + /* Master property list structure */ typedef struct { /* Union of all the different kinds of property lists */ @@ -36,6 +95,28 @@ typedef struct { H5P_class_t class; /* Property list class */ } H5P_t; +/* Private functions, not part of the publicly documented API */ +__DLL__ H5P_genclass_t *H5P_create_class(H5P_genclass_t *par_class, const char *name, + uintn hashsize, uintn internal, + H5P_cls_create_func_t cls_create, void *create_data, + H5P_cls_close_func_t cls_close, void *close_data); +__DLL__ H5P_genplist_t *H5P_create_list(H5P_genclass_t *class); +__DLL__ herr_t H5P_register(H5P_genclass_t *class, const char *name, + size_t size, 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_close_func_t prp_close); +__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_close_func_t prp_close); +__DLL__ herr_t H5P_set(H5P_genplist_t *plist, const char *name, void *value); +__DLL__ herr_t H5P_exist(H5P_genplist_t *plist, const char *name); +__DLL__ herr_t H5P_get_size(H5P_genplist_t *plist, const char *name); +__DLL__ herr_t H5P_get(H5P_genplist_t *plist, const char *name, void *value); +__DLL__ herr_t H5P_remove(H5P_genplist_t *plist, const char *name); +__DLL__ herr_t H5P_unregister(H5P_genclass_t *pclass, const char *name); +__DLL__ herr_t H5P_close_list(H5P_genplist_t *plist); +__DLL__ herr_t H5P_close_class(H5P_genclass_t *class); +__DLL__ herr_t H5P_init(void); __DLL__ hid_t H5P_create(H5P_class_t type, H5P_t *plist); __DLL__ void *H5P_copy(H5P_class_t type, const void *src); __DLL__ herr_t H5P_close(void *plist); |