diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-05 19:29:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-05-05 19:29:09 (GMT) |
commit | 7f99a80b0abee64d09ada9be749196cf8185eaf2 (patch) | |
tree | aa50771017835e0be9617240cdcb63c09504ae49 /src/H5Zprivate.h | |
parent | 14aaec71d7fe418fa6abb1b5c0ff92e092a77835 (diff) | |
download | hdf5-7f99a80b0abee64d09ada9be749196cf8185eaf2.zip hdf5-7f99a80b0abee64d09ada9be749196cf8185eaf2.tar.gz hdf5-7f99a80b0abee64d09ada9be749196cf8185eaf2.tar.bz2 |
[svn-r8482] Purpose:
Code cleanup
Description:
Refactored data transform code to reduce amount of symbols in the global
scope and also cleaned up & simplified the code a bit.
Platforms tested:
h5committest (minus copper, plus serial modi4)
FreeBSD 4.9 (sleipnir) w & w/o parallel
Diffstat (limited to 'src/H5Zprivate.h')
-rw-r--r-- | src/H5Zprivate.h | 56 |
1 files changed, 10 insertions, 46 deletions
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h index 48620be..33b7da9 100644 --- a/src/H5Zprivate.h +++ b/src/H5Zprivate.h @@ -19,12 +19,12 @@ #ifndef _H5Zprivate_H #define _H5Zprivate_H -#include "H5private.h" /* Generic Functions */ -#include "H5Tprivate.h" -#include "H5Eprivate.h" -#include "H5Iprivate.h" +/* Include package's public header */ #include "H5Zpublic.h" +/* Private headers needed by this file */ +#include "H5Tprivate.h" /* Datatypes */ + /* Structure to store information about each filter's parameters */ typedef struct { H5Z_filter_t id; /*filter identification number */ @@ -34,41 +34,6 @@ typedef struct { unsigned *cd_values; /*client data values */ } H5Z_filter_info_t; - -/* Token types */ -typedef enum { - ERROR, - H5Z_INTEGER, /* this represents an integer type in the data transform expression */ - H5Z_FLOAT, /* this represents a floating point type in the data transform expression */ - SYMBOL, - PLUS, - MINUS, - MULT, - DIVIDE, - LPAREN, - RPAREN, - END -} H5Z_token_type; - -typedef union { - char *sym_val; - long int_val; - double float_val; -} H5Z_num_val; - - -typedef struct H5Z_node { - struct H5Z_node *lchild; - struct H5Z_node *rchild; - H5Z_token_type type; - H5Z_num_val value; -} H5Z_node; - -typedef struct { - char* xform_exp; - H5Z_node* parse_root; -} H5Z_data_xform; - /* Special parameters for szip compression */ /* [These are aliases for the similar definitions in szlib.h, which we can't * include directly due to the duplication of various symbols with the zlib.h @@ -100,12 +65,11 @@ H5_DLL htri_t H5Z_all_filters_avail(const struct H5O_pline_t *pline); H5_DLL herr_t H5Z_delete(struct H5O_pline_t *pline, H5Z_filter_t filter); /* Data Transform Functions */ -H5_DLL void H5Z_xform_destroy_parse_tree(H5Z_node *tree); -H5_DLL void H5Z_xform_eval(H5Z_node *tree, void* array, hsize_t array_size, hid_t array_type); -H5_DLL void* H5Z_xform_parse(const char *expression); -H5_DLL hid_t H5Z_xform_find_type(H5T_t* type); -H5_DLL void H5Z_xform_reduce_tree(H5Z_node* tree); -H5_DLL void* H5Z_xform_copy_tree(H5Z_node* tree); - +typedef struct H5Z_data_xform_t H5Z_data_xform_t; /* Defined in H5Ztrans.c */ +H5_DLL H5Z_data_xform_t *H5Z_xform_create(const char *expr); +H5_DLL herr_t H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop); +H5_DLL herr_t H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop); +H5_DLL void H5Z_xform_eval(const H5Z_data_xform_t *data_xform_prop, void* array, hsize_t array_size, const H5T_t *buf_type); +H5_DLL hbool_t H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop); #endif |