#ifndef _sf_simtab_h #define _sf_simtab_h #include #include #include "_bool.h" #define SF_EOL '\014' #define SF_EOT '\004' typedef struct sf_SimTab *sf_simtab; /* Simbol Table structure */ sf_simtab sf_simtab_init(int size); /*< Create simbol table. >*/ void sf_simtab_close(sf_simtab table); /*< Free allocated memory >*/ void sf_simtab_enter(sf_simtab table, const char *key, const char* val); /*< Add an entry key=val to the table >*/ char *sf_simtab_get(sf_simtab table, const char *key); /*< extract a value from the table >*/ bool sf_simtab_getint (sf_simtab table, const char* key,/*@out@*/ int* par); /*< extract an int parameter from the table >*/ bool sf_simtab_getfloat (sf_simtab table, const char* key,/*@out@*/ float* par); /*< extract a float parameter from the table >*/ bool sf_simtab_getdouble (sf_simtab table, const char* key,/*@out@*/ double* par); /*< extract a double parameter from the table >*/ char* sf_simtab_getstring (sf_simtab table, const char* key); /*< extract a string parameter from the table >*/ bool sf_simtab_getbool (sf_simtab table, const char* key,/*@out@*/ bool *par); /*< extract a bool parameter from the table >*/ void sf_simtab_put (sf_simtab table, const char *keyval); /*< put a key=val string to the table >*/ void sf_simtab_input (sf_simtab table, FILE* fp, FILE* out); /*< extract parameters from a file >*/ bool sf_simtab_getdoubles (sf_simtab table, const char* key, double* par,size_t n); /*< extract a float array parameter from the table >*/ #endif