tavl.h File Reference

#include <stddef.h>

Include dependency graph for tavl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  libavl_allocator
struct  tavl_table
struct  tavl_node
struct  tavl_traverser

Defines

#define TAVL_H   1
#define TAVL_MAX_HEIGHT   32
#define tavl_count(table)   ((size_t) (table)->tavl_count)

Typedefs

typedef int tavl_comparison_func (const void *tavl_a, const void *tavl_b, void *tavl_param)
typedef void tavl_item_func (void *tavl_item, void *tavl_param)
typedef void * tavl_copy_func (void *tavl_item, void *tavl_param)

Enumerations

enum  tavl_tag { TAVL_CHILD, TAVL_THREAD }

Functions

void * tavl_malloc (struct libavl_allocator *, size_t)
void tavl_free (struct libavl_allocator *, void *)
struct tavl_tabletavl_create (tavl_comparison_func *, void *, struct libavl_allocator *)
struct tavl_tabletavl_copy (const struct tavl_table *, tavl_copy_func *, tavl_item_func *, struct libavl_allocator *)
void tavl_destroy (struct tavl_table *, tavl_item_func *)
void ** tavl_probe (struct tavl_table *, void *)
void * tavl_insert (struct tavl_table *, void *)
void * tavl_replace (struct tavl_table *, void *)
void * tavl_delete (struct tavl_table *, const void *)
void * tavl_find (const struct tavl_table *, const void *)
void tavl_assert_insert (struct tavl_table *, void *)
void * tavl_assert_delete (struct tavl_table *, void *)
void tavl_t_init (struct tavl_traverser *, struct tavl_table *)
void * tavl_t_first (struct tavl_traverser *, struct tavl_table *)
void * tavl_t_last (struct tavl_traverser *, struct tavl_table *)
void * tavl_t_find (struct tavl_traverser *, struct tavl_table *, void *)
void * tavl_t_insert (struct tavl_traverser *, struct tavl_table *, void *)
void * tavl_t_copy (struct tavl_traverser *, const struct tavl_traverser *)
void * tavl_t_next (struct tavl_traverser *)
void * tavl_t_prev (struct tavl_traverser *)
void * tavl_t_cur (struct tavl_traverser *)
void * tavl_t_replace (struct tavl_traverser *, void *)

Variables

struct libavl_allocator tavl_allocator_default


Define Documentation

#define tavl_count ( table   )     ((size_t) (table)->tavl_count)

Definition at line 104 of file tavl.h.

#define TAVL_H   1

Definition at line 27 of file tavl.h.

#define TAVL_MAX_HEIGHT   32

Definition at line 54 of file tavl.h.

Referenced by tavl_probe().


Typedef Documentation

typedef int tavl_comparison_func(const void *tavl_a, const void *tavl_b, void *tavl_param)

Definition at line 32 of file tavl.h.

typedef void* tavl_copy_func(void *tavl_item, void *tavl_param)

Definition at line 35 of file tavl.h.

typedef void tavl_item_func(void *tavl_item, void *tavl_param)

Definition at line 34 of file tavl.h.


Enumeration Type Documentation

enum tavl_tag

Enumerator:
TAVL_CHILD 
TAVL_THREAD 

Definition at line 68 of file tavl.h.


Function Documentation

void* tavl_assert_delete ( struct tavl_table ,
void *   
)

Definition at line 975 of file tavl.c.

References tavl_delete().

void tavl_assert_insert ( struct tavl_table ,
void *   
)

Definition at line 966 of file tavl.c.

References tavl_probe().

struct tavl_table* tavl_copy ( const struct tavl_table ,
tavl_copy_func ,
tavl_item_func ,
struct libavl_allocator  
) [read]

struct tavl_table* tavl_create ( tavl_comparison_func ,
void *  ,
struct libavl_allocator  
) [read]

void* tavl_delete ( struct tavl_table ,
const void *   
)

void tavl_destroy ( struct tavl_table ,
tavl_item_func  
)

void* tavl_find ( const struct tavl_table ,
const void *   
)

void tavl_free ( struct libavl_allocator ,
void *   
)

Definition at line 948 of file tavl.c.

void* tavl_insert ( struct tavl_table ,
void *   
)

Definition at line 260 of file tavl.c.

References tavl_probe().

void* tavl_malloc ( struct libavl_allocator ,
size_t   
)

Definition at line 940 of file tavl.c.

void** tavl_probe ( struct tavl_table ,
void *   
)

void* tavl_replace ( struct tavl_table ,
void *   
)

Definition at line 271 of file tavl.c.

References tavl_probe().

void* tavl_t_copy ( struct tavl_traverser ,
const struct tavl_traverser  
)

void* tavl_t_cur ( struct tavl_traverser  ) 

Definition at line 758 of file tavl.c.

References tavl_node::tavl_data, and tavl_traverser::tavl_node.

void* tavl_t_find ( struct tavl_traverser ,
struct tavl_table ,
void *   
)

void* tavl_t_first ( struct tavl_traverser ,
struct tavl_table  
)

void tavl_t_init ( struct tavl_traverser ,
struct tavl_table  
)

Definition at line 581 of file tavl.c.

References tavl_traverser::tavl_node, and tavl_traverser::tavl_table.

Referenced by tavl_t_insert().

void* tavl_t_insert ( struct tavl_traverser ,
struct tavl_table ,
void *   
)

void* tavl_t_last ( struct tavl_traverser ,
struct tavl_table  
)

void* tavl_t_next ( struct tavl_traverser  ) 

void* tavl_t_prev ( struct tavl_traverser  ) 

void* tavl_t_replace ( struct tavl_traverser ,
void *   
)

Definition at line 769 of file tavl.c.

References tavl_node::tavl_data, and tavl_traverser::tavl_node.


Variable Documentation

Definition at line 955 of file tavl.c.

Referenced by tavl_create().


Generated on Sun Apr 6 17:32:54 2008 for GRASS by  doxygen 1.5.5