6 // Hash table with persistent storage in stringfiles.
9 #include "stringfile.inc"
17 Defaults(char *filename
);
20 int load(); // load from disk file
21 int save(); // save to disk file
22 int load_string(char *string
); // load from string
23 int save_string(char* &string
); // save to new string
24 void save_stringfile(StringFile
*file
);
25 void load_stringfile(StringFile
*file
);
26 int update(char *name
, Freq value
); // update a value if it exists
27 int update(char *name
, double value
); // update a value if it exists
28 int update(char *name
, float value
); // update a value if it exists
29 int update(char *name
, int32_t value
); // update a value if it exists
30 int update(char *name
, int64_t value
); // update a value if it exists
31 int update(char *name
, char *value
); // create it if it doesn't
33 double get(char *name
, double default_
); // retrieve a value if it exists
34 float get(char *name
, float default_
); // retrieve a value if it exists
35 int32_t get(char *name
, int32_t default_
); // retrieve a value if it exists
36 int64_t get(char *name
, int64_t default_
); // retrieve a value if it exists
37 char* get(char *name
, char *default_
); // return 1 if it doesn't
39 char *names
[1024]; // list of string names
40 char *values
[1024]; // list of values
41 int total
; // number of defaults
42 char filename
[1024]; // filename the defaults are stored in