summaryrefslogtreecommitdiffstats
path: root/src/H5Gprivate.h
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-01 20:20:33 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-01 20:20:33 (GMT)
commit412e5606a83551629d2a6b15bc89b55d2de6081f (patch)
treee810f7f982cf70515aaa2cceb81909cfd069fa1e /src/H5Gprivate.h
parentd93c5653fd3526ba1f67b10ebadab01d5cea565f (diff)
downloadhdf5-412e5606a83551629d2a6b15bc89b55d2de6081f.zip
hdf5-412e5606a83551629d2a6b15bc89b55d2de6081f.tar.gz
hdf5-412e5606a83551629d2a6b15bc89b55d2de6081f.tar.bz2
[svn-r6] Added the next layer of symbol table functions. Given a symbol table
name, they operate to query or modify the corresponding symbol table entry. They don't understand directory hierarchies (that's the next layer up). Since the object header stuff isn't done yet, they call four stub functions that all return failure: not_implemented_yet__create_object_header() not_implemented_yet__insert_symtab_message() not_implemented_yet__get_symtab_message() not_implemented_yet__update_symtab_message() The interface is: haddr_t H5G_new (file, initial_heap_size) Creates a new symbol table. haddr_t H5G_find (file, symtab_addr, symbol_name, *entry) Returns a symbol table entry given the name. herr_t H5G_modify (file, symtab_addr, symbol_name, *entry) Modifies the symbol table entry for the specified name. herr_t H5G_insert (file, symtab_addr, symbol_name, *entry) Inserts a new name and symbol table entry pair. intn H5G_list (file, symtab_addr, maxentries, names[], entries[]) Returns a list of all names and symbol table entries.
Diffstat (limited to 'src/H5Gprivate.h')
-rw-r--r--src/H5Gprivate.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 4b7930d..73a06ee 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -17,9 +17,12 @@
#ifndef _H5Gprivate_H
#define _H5Gprivate_H
-#include "H5Gproto.h" /*include public declarations */
+/*include public declarations */
+#include "H5Gproto.h"
-#include "H5Fprivate.h" /*include packages needed by this header*/
+/*include packages needed by this header*/
+#include "H5Bprivate.h"
+#include "H5Fprivate.h"
#define H5G_NODE_MAGIC "SNOD" /*symbol table node magic number */
#define H5G_NODE_VERS 1 /*symbol table node version number */
@@ -83,6 +86,11 @@ typedef struct H5G_node_key_t {
off_t offset; /*offset into heap for name */
} H5G_node_key_t;
+typedef enum H5G_oper_t {
+ H5G_OPER_FIND =0, /*find a symbol */
+ H5G_OPER_MODIFY =1 /*modify a symbol */
+} 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
@@ -91,10 +99,11 @@ typedef struct H5G_node_key_t {
typedef struct H5G_node_ud1_t {
/* downward */
- char *name; /*points to temporary memory */
+ H5G_oper_t operation; /*what operation to perform */
+ const char *name; /*points to temporary memory */
haddr_t heap; /*symbol table heap address */
- /* upward */
+ /* upward for H5G_OPER_FIND, downward for H5G_OPER_MODIFY */
H5G_entry_t entry; /*symbol table entry */
} H5G_node_ud1_t;
@@ -104,17 +113,28 @@ typedef struct H5G_node_list_t {
/* downward */
H5G_entry_t *entry; /*array of entries, alloc'd by caller */
char **name; /*array of string ptrs, allocd by caller*/
- intn nentries; /*size of the ADDR and NAME arrays */
+ intn maxentries; /*size of the ADDR and NAME arrays */
haddr_t heap; /*heap address */
/* upward */
- intn nused; /*num. symbols processed */
+ intn nsyms; /*num. symbols processed */
} H5G_node_list_t;
+extern const H5B_class_t H5B_SNODE[1];
+
/*
* Library prototypes...
*/
+haddr_t H5G_new (hdf5_file_t *f, size_t init);
+haddr_t H5G_find (hdf5_file_t *f, haddr_t addr, const char *name,
+ H5G_entry_t *entry);
+herr_t H5G_modify (hdf5_file_t *f, haddr_t addr, const char *name,
+ H5G_entry_t *entry);
+herr_t H5G_insert (hdf5_file_t *f, haddr_t addr, const char *name,
+ H5G_entry_t *entry);
+intn H5G_list (hdf5_file_t *f, haddr_t addr, int maxentries,
+ char *names[], H5G_entry_t entries[]);
herr_t H5G_decode (hdf5_file_t *f, uint8 **pp, H5G_entry_t *ent);
herr_t H5G_decode_vec (hdf5_file_t *f, uint8 **pp, H5G_entry_t *ent, intn n);
herr_t H5G_encode (hdf5_file_t *f, uint8 **pp, H5G_entry_t *ent);