1997-09-20 00:36:59 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 1997 National Center for Supercomputing Applications.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Programmer: Robb Matzke <matzke@llnl.gov>
|
|
|
|
* Thursday, September 18, 1997
|
|
|
|
*
|
1998-01-17 06:23:43 +08:00
|
|
|
* Purpose: This file contains declarations which are visible
|
|
|
|
* only within the H5G package. Source files outside the
|
|
|
|
* H5G package should include H5Gprivate.h instead.
|
1997-09-20 00:36:59 +08:00
|
|
|
*/
|
|
|
|
#ifndef H5G_PACKAGE
|
|
|
|
#error "Do not include this file outside the H5G package!"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _H5Gpkg_H
|
|
|
|
#define _H5Gpkg_H
|
|
|
|
|
1997-09-22 10:08:54 +08:00
|
|
|
#include <H5ACprivate.h>
|
1997-09-20 00:36:59 +08:00
|
|
|
#include <H5Gprivate.h>
|
|
|
|
|
1998-01-23 00:41:32 +08:00
|
|
|
#define H5G_NODE_VERS 1 /*symbol table node version number */
|
|
|
|
#define H5G_SIZE_HINT 1024 /*default root grp size hint */
|
[svn-r139] ./src/*.[ch]
Removed the interface initialization argument from
FUNC_ENTER() and made it a locally-defined preprocessor
symbol, INTERFACE_INIT.
Changed `offset' to `address' and `length' to `size' in
documentation so it's more consistent. `Offset' still appears
occassionally when it refers to a byte offset within some
other data structure.
Moved interface termination function prototypes from public
header files to .c files and made them static.
./src/H5.c
./src/H5public.h
Added H5init() because it's possible that the predefined data
types are not initialized. This happens only if the first
call to the hdf5 library passes a predefined data type symbol
as an argument. There should be some way to fix this...
./src/H5A.c
./src/H5Aprivate.h
./src/H5Apublic.h
The free_func returns SUCCEED or FAIL, although the return
value is ignored by H5A. This is so we can use the various
H5*_close() functions to free things.
H5Ainc_ref() and H5Adec_ref() are no longer public. Many of
the other atom functions should also be made private, but I'll
save that for later...
Added additional template groups called H5_TEMPLATE_0 through
H5_TEMPLATE_7 that are used by the various template
subclasses.
Increased the number of bits used for atom groups to prevent
negative atoms.
./src/H5AC.c
./src/H5ACprivate.h
Changed H5AC_new() to H5AC_create() to make names more consistent.
./src/H5B.c
./src/H5Bprivate.h
Changed H5B_new() to H5B_create() to make names more consistent.
./src/H5C.c
./src/H5Cprivate.h
./src/H5Cpublic.h
Now supports multiple subclasses of templates, although it's
done with big switch statements. The default values for
templates are defined in the source file to which that
template belongs. This got rid of lots of needless
preprocessor constants.
Added H5Ccreate() to create a new template. Changed
H5C_release() to H5Cclose() to make the naming more
consistent.
./src/H5D.c
./src/H5Dprivate.h
./src/H5Dpublic.h
Enhanced to use the new dataset interface, and uses the enhanced
data type and data space interfaces, which haven't been
completely implemented. The dataset interface doesn't handle
non-contiguous storage, compression, or data type and space
conversions yet.
./src/H5F.c
./src/H5Fprivate.h
./src/H5Fpublic.h
Removed H5Fflush() since just calls H5F_flush(), which doesn't
do what the user would probably think it does, namely, flush
everything. It only flushes those things sitting in the H5AC
cache and the boot block.
Changed the `file_create_parms' field of H5F_low_t to just
`create_parms' since the `file' part is obvious.
./src/H5Fistore.c
Added some support for external files. Mostly just in the
file format and not supported much by the library yet. I need
to finish some dataset functions first.
Changed H5F_istore_new() to H5F_istore_create() to make names
more uniform across packages.
./src/H5Flow.c
Flushing a file causes the file to be physically extended to
the logical eof. This prevents H5F_open() from thinking a
file has been truncated. Most of the time the file will
already be that large, and when it isn't Unix will often just
allocate the final block anyway.
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gpkg.h
./src/H5Gprivate.h
./src/H5Gstab.c
Removed H5G_basename()
Removed (temporarily) data type information from symbol table
entries and renamed H5G_CACHED_SDATA to H5G_CACHED_SDSPACE to
reflect that it's a simple data space and has nothing to do
with raw data.
Changed H5G_node_new() to H5G_node_create() and H5G_stab_new()
to H5G_stab_create() to make names more uniform across
packages.
Fixed an undefined address bug that happens when H5G_node_debug()
program doesn't pass enough info to H5G_node_load().
./src/H5H.c
./src/H5Hprivate.h
Changed H5H_new() to H5H_create() to make the names more
uniform across packages.
./src/H5M.c
./src/H5Mprivate.h
./src/H5Mpublic.h
Nulled all the create functions. Most of the other callbacks
are to public functions. Removed H5Mcreate().
Changed hobjtype_t to group_t since it has to be the same
thing anyway.
./src/H5O.c
./src/H5Oprivate.h
./src/H5Osdim.c
./src/H5Osdtyp.c
Changed H5O_SIM_DIM to H5O_SDSPACE (simple data space) since
`simple data space' is its official name, not `simple
dimensions'. Will eventually add H5O_CDSPACE for comples data
spaces. Changed _sim_dim_ to _dspace_.
Replaced H5O_SIM_DTYPE and the compound data type messages
with a single H5O_DTYPE message. Changed _sim_dtype_ to _dtype_.
Changed H5O_STD_STORE to H5O_CSTORE (contiguous storage) since
contiguous storage is not necessarily standard. Changed
_std_store_ to _cstore_ in H5Ocstore.c
Added the H5O_EFL (external file list) message.
Changed H5O_new() to H5O_create() to make names more uniform
across packages.
./src/H5Oefl.c NEW
External file list message for specifying which non-hdf5 files
contain raw data for a dataset.
./src/H5P.c
./src/H5Pprivate.h
./src/H5Ppublic.h
Renamed and moved data structures to make the names conform to
our naming scheme.
./src/H5T.c
./src/H5Tprivate.h
./src/H5Tpublic.h
./src/H5Tpkg.h NEW
Data structures redesigned to be more flexible. The interface
was redesigned to make it more regular and to make some names
more uniform across packages.
./src/H5detect.c
Output was changed to produce a file that conforms to the hdf5
coding standard.
./src/Makefile.in
Generates H5Tinit.c by running H5detect.
./src/debug.c
Moved command argument processing.
1997-12-11 06:41:07 +08:00
|
|
|
#define H5G_NODE_K(F) ((F)->shared->create_parms.sym_leaf_k)
|
1997-09-20 00:36:59 +08:00
|
|
|
#define H5G_NODE_SIZEOF_HDR(F) (H5G_NODE_SIZEOF_MAGIC + 4)
|
1998-01-23 00:41:32 +08:00
|
|
|
|
1997-09-20 00:36:59 +08:00
|
|
|
#define H5G_DEFAULT_ROOT_SIZE 32
|
|
|
|
|
1997-09-25 00:30:22 +08:00
|
|
|
/*
|
|
|
|
* A symbol table node is a collection of symbol table entries. It can
|
|
|
|
* be thought of as the lowest level of the B-link tree that points to
|
|
|
|
* a collection of symbol table entries that belong to a specific symbol
|
1997-10-21 07:14:35 +08:00
|
|
|
* table or group.
|
1997-09-25 00:30:22 +08:00
|
|
|
*/
|
|
|
|
typedef struct H5G_node_t {
|
1998-01-23 00:41:32 +08:00
|
|
|
hbool_t dirty; /*has cache been modified? */
|
|
|
|
int nsyms; /*number of symbols */
|
|
|
|
H5G_entry_t *entry; /*array of symbol table entries */
|
1997-09-25 00:30:22 +08:00
|
|
|
} H5G_node_t;
|
|
|
|
|
1997-09-20 00:36:59 +08:00
|
|
|
/*
|
|
|
|
* Each key field of the B-link tree that points to symbol table
|
|
|
|
* nodes consists of this structure...
|
|
|
|
*/
|
|
|
|
typedef struct H5G_node_key_t {
|
1998-01-23 00:41:32 +08:00
|
|
|
size_t offset; /*offset into heap for name */
|
1997-09-20 00:36:59 +08:00
|
|
|
} H5G_node_key_t;
|
|
|
|
|
1998-01-06 11:07:15 +08:00
|
|
|
/*
|
|
|
|
* A group handle passed around through layers of the library within and
|
|
|
|
* above the H5G layer.
|
|
|
|
*/
|
|
|
|
struct H5G_t {
|
1998-01-23 00:41:32 +08:00
|
|
|
int nref; /*open reference count */
|
|
|
|
H5G_entry_t ent; /*info about the group */
|
1998-01-06 11:07:15 +08:00
|
|
|
};
|
|
|
|
|
1997-10-21 07:14:35 +08:00
|
|
|
/*
|
|
|
|
* Each file has a stack of open groups with the latest entry on the
|
|
|
|
* stack the current working group. If the stack is empty then the
|
|
|
|
* current working group is the root object.
|
|
|
|
*/
|
|
|
|
typedef struct H5G_cwgstk_t {
|
1998-01-23 00:41:32 +08:00
|
|
|
H5G_t *grp; /*a handle to an open group */
|
|
|
|
struct H5G_cwgstk_t *next; /*next item (earlier) on stack */
|
1997-10-21 07:14:35 +08:00
|
|
|
} H5G_cwgstk_t;
|
|
|
|
|
1997-09-20 00:36:59 +08:00
|
|
|
/*
|
|
|
|
* These operations can be passed down from the H5G_stab layer to the
|
|
|
|
* H5G_node layer through the B-tree layer.
|
|
|
|
*/
|
|
|
|
typedef enum H5G_oper_t {
|
1998-01-23 00:41:32 +08:00
|
|
|
H5G_OPER_FIND = 0, /*find a symbol */
|
|
|
|
H5G_OPER_INSERT = 1 /*insert a new symbol */
|
1997-09-20 00:36:59 +08:00
|
|
|
} H5G_oper_t;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Data exchange structure for symbol table nodes. This structure is
|
|
|
|
* passed through the B-link tree layer to the methods for the objects
|
|
|
|
* to which the B-link tree points.
|
|
|
|
*/
|
|
|
|
typedef struct H5G_bt_ud1_t {
|
|
|
|
|
1998-01-17 06:23:43 +08:00
|
|
|
/* downward */
|
1998-01-23 00:41:32 +08:00
|
|
|
H5G_oper_t operation; /*what operation to perform */
|
|
|
|
const char *name; /*points to temporary memory */
|
|
|
|
haddr_t heap_addr; /*symbol table heap address */
|
1997-09-20 00:36:59 +08:00
|
|
|
|
1998-01-17 06:23:43 +08:00
|
|
|
/* downward for INSERT, upward for FIND */
|
1998-01-23 00:41:32 +08:00
|
|
|
H5G_entry_t ent; /*entry to insert into table */
|
1997-09-20 00:36:59 +08:00
|
|
|
|
|
|
|
} H5G_bt_ud1_t;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Data exchange structure to pass through the B-tree layer for the
|
1998-03-24 22:53:57 +08:00
|
|
|
* H5B_iterate function.
|
1997-09-20 00:36:59 +08:00
|
|
|
*/
|
|
|
|
typedef struct H5G_bt_ud2_t {
|
1998-01-17 06:23:43 +08:00
|
|
|
/* downward */
|
1998-03-24 22:53:57 +08:00
|
|
|
hid_t group_id; /*group id to pass to iteration operator */
|
|
|
|
struct H5G_t *group; /*the group to which group_id points */
|
|
|
|
int skip; /*initial entries to skip */
|
|
|
|
H5G_iterate_t op; /*iteration operator */
|
|
|
|
void *op_data; /*user-defined operator data */
|
1998-01-17 06:23:43 +08:00
|
|
|
|
|
|
|
/* upward */
|
1998-03-24 22:53:57 +08:00
|
|
|
|
1997-09-20 00:36:59 +08:00
|
|
|
} H5G_bt_ud2_t;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This is the class identifier to give to the B-tree functions.
|
|
|
|
*/
|
1998-01-23 00:41:32 +08:00
|
|
|
extern H5B_class_t H5B_SNODE[1];
|
1997-09-20 00:36:59 +08:00
|
|
|
|
1997-09-22 10:08:54 +08:00
|
|
|
/* The cache subclass */
|
|
|
|
extern const H5AC_class_t H5AC_SNODE[1];
|
|
|
|
|
1997-09-20 00:36:59 +08:00
|
|
|
/*
|
1997-10-21 07:14:35 +08:00
|
|
|
* Functions that understand symbol tables but not names. The
|
|
|
|
* functions that understand names are exported to the rest of
|
1997-09-20 00:36:59 +08:00
|
|
|
* the library and appear in H5Gprivate.h.
|
|
|
|
*/
|
1998-01-23 00:41:32 +08:00
|
|
|
herr_t H5G_stab_create (H5F_t *f, size_t size_hint, H5G_entry_t *ent/*out*/);
|
|
|
|
herr_t H5G_stab_find (H5G_entry_t *grp_ent, const char *name,
|
|
|
|
H5G_entry_t *obj_ent/*out*/);
|
|
|
|
herr_t H5G_stab_insert (H5G_entry_t *grp_ent, const char *name,
|
|
|
|
H5G_entry_t *obj_ent);
|
1997-09-20 00:36:59 +08:00
|
|
|
/*
|
|
|
|
* Functions that understand symbol table entries.
|
|
|
|
*/
|
1998-01-23 00:41:32 +08:00
|
|
|
herr_t H5G_ent_decode_vec (H5F_t *f, const uint8 **pp, H5G_entry_t *ent,
|
|
|
|
intn n);
|
|
|
|
herr_t H5G_ent_encode_vec (H5F_t *f, uint8 **pp, H5G_entry_t *ent, intn n);
|
1997-09-20 00:36:59 +08:00
|
|
|
#endif
|