src/misc/st/stmm.h File Reference

#include "extra.h"
Include dependency graph for stmm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stmm_table_entry
struct  stmm_table
struct  stmm_generator

Defines

#define stmm_is_member(table, key)   stmm_lookup(table,key,(char **) 0)
#define stmm_count(table)   ((table)->num_entries)
#define STMM_DEFAULT_MAX_DENSITY   5
#define STMM_DEFAULT_INIT_TABLE_SIZE   11
#define STMM_DEFAULT_GROW_FACTOR   2.0
#define STMM_DEFAULT_REORDER_FLAG   0
#define stmm_foreach_item2(tb, gen, key, value)
#define stmm_foreach_item(table, gen, key, value)   for(gen=stmm_init_gen(table); stmm_gen(gen,key,value) || (stmm_free_gen(gen),0);)
#define stmm_foreach_item_int(table, gen, key, value)   for(gen=stmm_init_gen(table); stmm_gen_int(gen,key,value) || (stmm_free_gen(gen),0);)
#define STMM_OUT_OF_MEM   -10000

Typedefs

typedef struct stmm_table_entry stmm_table_entry
typedef struct stmm_table stmm_table
typedef struct stmm_generator stmm_generator
typedef int(* STMM_PFI )()

Enumerations

enum  stmm_retval { STMM_CONTINUE, STMM_STOP, STMM_DELETE }

Functions

EXTERN stmm_table
*stmm_init_table_with_params 
ARGS ((STMM_PFI, STMM_PFI, int, int, double, int))
EXTERN stmm_table *stmm_init_table ARGS ((STMM_PFI, STMM_PFI))
EXTERN void stmm_free_table ARGS ((stmm_table *))
EXTERN int stmm_lookup ARGS ((stmm_table *, char *, char **))
EXTERN int stmm_lookup_int ARGS ((stmm_table *, char *, int *))
EXTERN int stmm_insert ARGS ((stmm_table *, char *, char *))
EXTERN int stmm_find_or_add ARGS ((stmm_table *, char *, char ***))
EXTERN int stmm_delete ARGS ((stmm_table *, char **, char **))
EXTERN int stmm_delete_int ARGS ((stmm_table *, long *, char **))
EXTERN int stmm_foreach ARGS ((stmm_table *, STMM_PFSR, char *))
EXTERN int stmm_strhash ARGS ((char *, int))
EXTERN int stmm_numcmp ARGS ((char *, char *))
EXTERN int stmm_gen ARGS ((stmm_generator *, char **, char **))
EXTERN int stmm_gen_int ARGS ((stmm_generator *, char **, long *))
EXTERN void stmm_free_gen ARGS ((stmm_generator *))

Variables

enum stmm_retval(* STMM_PFSR )()

Define Documentation

#define stmm_count ( table   )     ((table)->num_entries)

Definition at line 57 of file stmm.h.

#define STMM_DEFAULT_GROW_FACTOR   2.0

Definition at line 95 of file stmm.h.

#define STMM_DEFAULT_INIT_TABLE_SIZE   11

Definition at line 94 of file stmm.h.

#define STMM_DEFAULT_MAX_DENSITY   5

Definition at line 93 of file stmm.h.

#define STMM_DEFAULT_REORDER_FLAG   0

Definition at line 96 of file stmm.h.

#define stmm_foreach_item ( table,
gen,
key,
value   )     for(gen=stmm_init_gen(table); stmm_gen(gen,key,value) || (stmm_free_gen(gen),0);)

Definition at line 103 of file stmm.h.

#define stmm_foreach_item2 ( tb,
gen,
key,
value   ) 
Value:
for(gen.table=(tb), gen.entry=NULL, gen.index=0; \
            stmm_gen(&(gen),key,value);)

Definition at line 99 of file stmm.h.

#define stmm_foreach_item_int ( table,
gen,
key,
value   )     for(gen=stmm_init_gen(table); stmm_gen_int(gen,key,value) || (stmm_free_gen(gen),0);)

Definition at line 106 of file stmm.h.

#define stmm_is_member ( table,
key   )     stmm_lookup(table,key,(char **) 0)

Definition at line 56 of file stmm.h.

#define STMM_OUT_OF_MEM   -10000

Definition at line 109 of file stmm.h.


Typedef Documentation

Definition at line 25 of file stmm.h.

typedef int(* STMM_PFI)()

Definition at line 63 of file stmm.h.

typedef struct stmm_table stmm_table

Definition at line 24 of file stmm.h.

Definition at line 23 of file stmm.h.


Enumeration Type Documentation

Enumerator:
STMM_CONTINUE 
STMM_STOP 
STMM_DELETE 

Definition at line 59 of file stmm.h.


Function Documentation

EXTERN void stmm_free_gen ARGS ( (stmm_generator *)   ) 
EXTERN int stmm_gen_int ARGS ( (stmm_generator *, char **, long *)   ) 
EXTERN int stmm_gen ARGS ( (stmm_generator *, char **, char **)   ) 
EXTERN int stmm_numcmp ARGS ( (char *, char *)   ) 
EXTERN int stmm_ptrhash ARGS ( (char *, int)   ) 
EXTERN int stmm_foreach ARGS ( (stmm_table *, STMM_PFSR, char *)   ) 
EXTERN int stmm_delete_int ARGS ( (stmm_table *, long *, char **)   ) 
EXTERN int stmm_delete ARGS ( (stmm_table *, char **, char **)   ) 
EXTERN int stmm_find ARGS ( (stmm_table *, char *, char ***)   ) 
EXTERN int stmm_add_direct ARGS ( (stmm_table *, char *, char *)   ) 
EXTERN int stmm_lookup_int ARGS ( (stmm_table *, char *, int *)   ) 
EXTERN int stmm_lookup ARGS ( (stmm_table *, char *, char **)   ) 
EXTERN void stmm_clean ARGS ( (stmm_table *)   ) 
EXTERN stmm_table* stmm_init_table ARGS ( (STMM_PFI, STMM_PFI  ) 
EXTERN stmm_table* stmm_init_table_with_params ARGS ( (STMM_PFI, STMM_PFI, int, int, double, int)   ) 

Variable Documentation


Generated on Tue Jan 5 12:19:19 2010 for abc70930 by  doxygen 1.6.1