Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dt_node.h

Go to the documentation of this file.
00001 
00038 #ifndef INCLUDED_DT_NODE_H
00039 #define INCLUDED_DT_NODE_H
00040 
00041 #include "dt_type.h"
00042 
00044 typedef enum { dt_leaf_node, dt_arr_node, dt_rec_node } dt_node_kind;
00045 
00046 typedef struct dt_node_ dt_node;
00047 
00056 dt_node* dt_make_leaf( dt_byte const* begin, size_t len );
00058 dt_node* dt_make_rec();
00060 dt_node* dt_make_arr();
00064 void dt_node_addref ( dt_node* node );
00069 void dt_node_release( dt_node* node );
00070 
00074 enum dt_node_kind dt_node_get_kind( dt_node* node );
00075 
00076 
00077 
00087 dt_bool dt_leaf_get_data( dt_node const* leaf, dt_byte const** begin, size_t* len );
00088 
00089 
00090 
00094 size_t  dt_arr_get_size( dt_node const* arr );
00098 dt_node*   dt_arr_get( dt_node const* arr, unsigned ind );
00107 dt_bool           dt_arr_put( dt_node* arr, unsigned ind, dt_node* item );
00116 dt_bool  dt_arr_append( dt_node* arr, dt_node* item );
00117 
00118 
00119 
00123 size_t  dt_rec_get_size( dt_node const* node );
00124 
00129 dt_node*   dt_rec_get( dt_node const* rec, dt_byte const* key, size_t key_len );
00130 
00132 dt_node*   dt_rec_sget( dt_node const* rec, char const* key);
00133 
00134 
00146 dt_bool  dt_rec_put( dt_node* rec, dt_byte const* key, size_t key_len, dt_node* item );
00147 
00149 dt_bool  dt_rec_sput( dt_node* rec, char const* key, dt_node* item );
00150 
00151 
00161 dt_node*   dt_rec_get_nth(  dt_node* rec, unsigned ind
00162                          , dt_byte const** key, size_t* key_len
00163                          );
00164 
00165 #endif/*INCLUDED_DT_NODE_H*/
00166 

Generated on Sun Jun 1 16:35:38 2003 for datatree by doxygen 1.3.1