summaryrefslogtreecommitdiffstats
path: root/src/H5Pprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-11-20 19:17:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-11-20 19:17:25 (GMT)
commitdabfd39dc8a7b6fbca22a5f6ff341ded54d78fd4 (patch)
treeb299b8504950d9644d77ced3eb0bc82cf9aa8109 /src/H5Pprivate.h
parent977504e69fc552f1710c822668141a018137971f (diff)
downloadhdf5-dabfd39dc8a7b6fbca22a5f6ff341ded54d78fd4.zip
hdf5-dabfd39dc8a7b6fbca22a5f6ff341ded54d78fd4.tar.gz
hdf5-dabfd39dc8a7b6fbca22a5f6ff341ded54d78fd4.tar.bz2
[svn-r4626] Purpose:
Code cleanup Description: Moved parts of the H5P stuff into the new H5Ppkg.h header file from here. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5Pprivate.h')
-rw-r--r--src/H5Pprivate.h104
1 files changed, 27 insertions, 77 deletions
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index d7ba533..28071f4 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -20,92 +20,42 @@
/* Private headers needed by this file */
#include "H5private.h"
-#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_INC_REF, /* Increment the ID reference count*/
- H5P_MOD_DEC_REF, /* Decrement the ID reference 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 */
- unsigned xor_val; /* 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_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_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 */
- size_t nprops; /* Number of properties in class */
- unsigned hashsize; /* Hash table size */
- unsigned plists; /* Number of property lists that have been created since the last modification to the class */
- unsigned classes; /* Number of classes that have been derived since the last modification to the class */
- unsigned ref_count; /* Number of oustanding ID's open on this class object */
- unsigned internal; /* Whether this class is internal to the library or not */
- unsigned deleted; /* 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_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_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 */
- hid_t plist_id; /* Copy of the property list ID (for use in close callback) */
- size_t nprops; /* Number of properties in class */
- unsigned 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;
+/* Forward declarations for anonymous H5P objects */
+typedef struct H5P_genplist_tag H5P_genplist_t;
+typedef struct H5P_genclass_tag H5P_genclass_t;
/* Private functions, not part of the publicly documented API */
__DLL__ herr_t H5P_init(void);
-__DLL__ hid_t H5P_copy(hid_t old_plist_id);
+
+/* Internal versions of API routines */
+__DLL__ hid_t H5P_create_id(H5P_genclass_t *pclass);
+__DLL__ hid_t H5P_copy_plist(H5P_genplist_t *old_plist);
+__DLL__ herr_t H5P_get(H5P_genplist_t *plist, const char *name, void *value);
+__DLL__ herr_t H5P_set(H5P_genplist_t *plist, const char *name, const void *value);
+__DLL__ char *H5P_get_class_name(H5P_genclass_t *pclass);
+__DLL__ herr_t H5P_get_nprops_pclass(H5P_genclass_t *pclass, size_t *nprops);
__DLL__ herr_t H5P_register(H5P_genclass_t *pclass, 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_delete_func_t prp_delete,
H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close);
-__DLL__ herr_t H5P_get(hid_t plist_id, const char *name, void *value);
-__DLL__ herr_t H5P_set(hid_t plist_id, const char *name, const void *value);
-__DLL__ hid_t H5P_get_driver(hid_t plist_id);
+__DLL__ hid_t H5P_get_driver(H5P_genplist_t *plist);
+__DLL__ void * H5P_get_driver_info(H5P_genplist_t *plist);
+__DLL__ herr_t H5P_set_driver(H5P_genplist_t *plist, hid_t new_driver_id,
+ const void *new_driver_info);
+__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);
+
+/* *SPECIAL* Don't make more of these! -QAK */
+__DLL__ htri_t H5P_isa_class(hid_t plist_id, hid_t pclass_id);
+
/* Private functions to "peek" at properties of a certain type */
-__DLL__ unsigned H5P_peek_unsigned(hid_t plist_id, const char *name);
-__DLL__ hid_t H5P_peek_hid_t(hid_t plist_id, const char *name);
-__DLL__ void *H5P_peek_voidp(hid_t plist_id, const char *name);
-__DLL__ hsize_t H5P_peek_hsize_t(hid_t plist_id, const char *name);
-__DLL__ size_t H5P_peek_size_t(hid_t plist_id, const char *name);
+__DLL__ unsigned H5P_peek_unsigned(H5P_genplist_t *plist, const char *name);
+__DLL__ hid_t H5P_peek_hid_t(H5P_genplist_t *plist, const char *name);
+__DLL__ void *H5P_peek_voidp(H5P_genplist_t *plist, const char *name);
+__DLL__ hsize_t H5P_peek_hsize_t(H5P_genplist_t *plist, const char *name);
+__DLL__ size_t H5P_peek_size_t(H5P_genplist_t *plist, const char *name);
#endif