Main Page | Modules | Data Structures | File List | Data Fields

/extra/work/state-dev/src/metrics/scd_tree.h

00001 /* ----------------------------------------------------------------------------
00002  * $Id: scd_tree.h,v 1.7 2003/10/06 20:47:18 jlewalle Exp $
00003  *
00004  * --------------------------------------------------------------------------*/
00005 #if !defined(_INCLUDED_SCD_TREE_H_HEADER__)
00006 #define _INCLUDED_SCD_TREE_H_HEADER__
00007 
00018 typedef struct scd_tnode_t
00019 {
00020   struct scd_tnode_t *par;
00021   struct scd_tnode_t *np;
00022   struct scd_tnode_t *cp;
00023   struct scd_tnode_t *ep;
00024   char *name;
00025   char *path;
00026   void *ptr;
00027 } scd_tnode_t;
00028 
00033 typedef struct scd_tree_t
00034 {
00035   apr_pool_t *pool;
00036   apr_hash_t *map;
00037   apr_thread_rwlock_t *lock;
00038   scd_tnode_t *top;
00039   char *base;
00040 } scd_tree_t;
00041 
00049 SCD_DECLARE(sul_error_t *)
00050 scd_tree_create(scd_tree_t **tree, apr_pool_t *pool);
00051 
00059 SCD_DECLARE(scd_tnode_t *)
00060 scd_tree_node_new(scd_tree_t *tree, scd_tnode_t *par, const char *name);
00061 
00069 SCD_DECLARE(scd_tnode_t *)
00070 scd_tree_node_find(scd_tnode_t *node, const char *name);
00071 
00080 SCD_DECLARE(scd_tnode_t *)
00081 scd_tree_node_search(scd_tree_t *tree, const char *path, apr_pool_t *pool);
00082 
00089 SCD_DECLARE(scd_tnode_t *)
00090 scd_tree_node_cp(scd_tnode_t *node);
00091 
00098 SCD_DECLARE(scd_tnode_t *)
00099 scd_tree_node_np(scd_tnode_t *node);
00100 
00108 SCD_DECLARE(scd_tnode_t *)
00109 scd_tree_node_append(scd_tnode_t *head, scd_tnode_t *node);
00110 
00118 SCD_DECLARE(sul_error_t *)
00119 scd_tree_walk(scd_tree_t *tree, scd_tnode_t *curr);
00120 
00129 SCD_DECLARE(sul_error_t *)
00130 scd_tree_add(scd_tree_t *tree, const char *path, void *value, apr_pool_t *pool);
00131 
00139 SCD_DECLARE(sul_error_t *)
00140 scd_tree_del(scd_tree_t *tree, const char *path);
00141 
00152 SCD_DECLARE(sul_error_t *)
00153 scd_tree_resolve(scd_tree_t *tree, const char *path, void **res, 
00154                  char **major, char **minor, apr_pool_t *pool);
00155 
00163 SCD_DECLARE(apr_array_header_t *)
00164 scd_tree_tokenize_path(const char *path, apr_pool_t *pool);
00165 
00168 #endif

Generated on Wed Apr 28 09:38:33 2004 for State by doxygen 1.3.5