summaryrefslogtreecommitdiffstats
path: root/src/H5Tprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-05-08 20:09:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-05-08 20:09:07 (GMT)
commit390f1d02846803abfd46d30b3bd27894a30698c6 (patch)
treeaa0269135e97f1e92f0c33d970dac519d5025532 /src/H5Tprivate.h
parent3fff86acfa11ab756a8f72f3a30478677fb7bcf6 (diff)
downloadhdf5-390f1d02846803abfd46d30b3bd27894a30698c6.zip
hdf5-390f1d02846803abfd46d30b3bd27894a30698c6.tar.gz
hdf5-390f1d02846803abfd46d30b3bd27894a30698c6.tar.bz2
[svn-r6837] Purpose:
Code cleanup. Description: Move many package or internal function prototypes and macro definitions into tighter scope according to their current use. Added more comments where appropriate. Eliminate ancient, unused functions. Added a couple "accessor" functions to get parts of data structures which were moved out of scope. Platforms tested: h5committested
Diffstat (limited to 'src/H5Tprivate.h')
-rw-r--r--src/H5Tprivate.h64
1 files changed, 9 insertions, 55 deletions
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index ddbd42d..deccfc5 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -21,14 +21,14 @@
#include "H5Tpublic.h"
/* Private headers needed by this file */
-#include "H5private.h"
-#include "H5Gprivate.h" /*for H5G_entry_t */
-#include "H5Rprivate.h" /*for H5R_type_t */
-
-#define H5T_RESERVED_ATOMS 8
-#define H5T_NAMELEN 32 /*length of debugging name buffer */
+#include "H5private.h" /* Generic Functions */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Rprivate.h" /* References */
+/* Forward references of package typedefs */
typedef struct H5T_t H5T_t;
+typedef struct H5T_stats_t H5T_stats_t;
+typedef struct H5T_path_t H5T_path_t;
/* How to copy a data type */
typedef enum H5T_copy_t {
@@ -37,34 +37,7 @@ typedef enum H5T_copy_t {
H5T_COPY_REOPEN
} H5T_copy_t;
-/* Statistics about a conversion function */
-typedef struct H5T_stats_t {
- unsigned ncalls; /*num calls to conversion function */
- hsize_t nelmts; /*total data points converted */
- H5_timer_t timer; /*total time for conversion */
-} H5T_stats_t;
-
-/* The data type conversion database */
-typedef struct H5T_path_t {
- char name[H5T_NAMELEN]; /*name for debugging only */
- H5T_t *src; /*source data type ID */
- H5T_t *dst; /*destination data type ID */
- H5T_conv_t func; /*data conversion function */
- hbool_t is_hard; /*is it a hard function? */
- H5T_stats_t stats; /*statistics for the conversion */
- H5T_cdata_t cdata; /*data for this function */
-} H5T_path_t;
-
-/*
- * VL types allowed.
- */
-typedef enum {
- H5T_VLEN_BADTYPE = -1, /* invalid VL Type */
- H5T_VLEN_SEQUENCE=0, /* VL sequence */
- H5T_VLEN_STRING, /* VL string */
- H5T_VLEN_MAXTYPE /* highest type (Invalid as true type) */
-} H5T_vlen_type_t;
-
+/* Location of VL information */
typedef enum {
H5T_VLEN_BADLOC = 0, /* invalid VL Type */
H5T_VLEN_MEMORY, /* VL data stored in memory */
@@ -72,27 +45,6 @@ typedef enum {
H5T_VLEN_MAXLOC /* highest type (Invalid as true type) */
} H5T_vlen_loc_t;
-/*
- * Internal data structure for passing information to H5T_vlen_get_buf_size
- */
-typedef struct {
- hid_t dataset_id; /* ID of the dataset we are working on */
- hid_t fspace_id; /* ID of the file dataset's dataspace we are working on */
- hid_t mspace_id; /* ID of the memory dataset's dataspace we are working on */
- void *fl_tbuf; /* Ptr to the temporary buffer we are using for fixed-length data */
- void *vl_tbuf; /* Ptr to the temporary buffer we are using for VL data */
- hid_t xfer_pid; /* ID of the dataset xfer property list */
- hsize_t size; /* Accumulated number of bytes for the selection */
-} H5T_vlen_bufsize_t;
-
-/*
- * Is the path the special no-op path? The no-op function can be set by the
- * application and there might be more than one no-op path in a
- * multi-threaded application if one thread is using the no-op path when some
- * other thread changes its definition.
- */
-#define H5T_IS_NOOP(P) ((P)->is_hard && 0==H5T_cmp((P)->src, (P)->dst))
-
/* Private functions */
H5_DLL herr_t H5TN_init_interface(void);
H5_DLL herr_t H5T_init(void);
@@ -111,6 +63,8 @@ H5_DLL htri_t H5T_is_immutable(H5T_t *dt);
H5_DLL htri_t H5T_is_named(H5T_t *dt);
H5_DLL H5T_path_t *H5T_path_find(const H5T_t *src, const H5T_t *dst,
const char *name, H5T_conv_t func, hid_t dxpl_id);
+H5_DLL hbool_t H5T_path_noop(const H5T_path_t *p);
+H5_DLL H5T_bkg_t H5T_path_bkg(const H5T_path_t *p);
H5_DLL herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id,
hsize_t nelmts, size_t buf_stride, size_t bkg_stride,
void *buf, void *bkg, hid_t dset_xfer_plist);