r802: Remove renderframfsclient and renderfarmfsserver .h and .C from Makefile.am...
[cinelerra_cv/mob.git] / guicast / defaults.h
blobfd2b89535c63192508dec19dd16896f52f1fa8f3
1 #ifndef DEFAULTS_H
2 #define DEFAULTS_H
6 // Hash table with persistent storage in stringfiles.
9 #include "stringfile.inc"
10 #include "units.h"
11 #include "properties.h"
14 class Defaults
16 public:
17 Defaults();
18 Defaults(char *filename);
19 virtual ~Defaults();
21 int load(); // load from disk file
22 int save(); // save to disk file
23 int load_string(char *string); // load from string
24 int save_string(char* &string); // save to new string
25 void save_stringfile(StringFile *file);
26 void load_stringfile(StringFile *file);
27 int update(char *name, Freq value); // update a value if it exists
28 int update(char *name, double value); // update a value if it exists
29 int update(char *name, float value); // update a value if it exists
30 int update(char *name, int32_t value); // update a value if it exists
31 int update(char *name, int64_t value); // update a value if it exists
32 int update(char *name, char *value); // create it if it doesn't
34 double get(char *name, double default_); // retrieve a value if it exists
35 float get(char *name, float default_); // retrieve a value if it exists
36 int32_t get(char *name, int32_t default_); // retrieve a value if it exists
37 int64_t get(char *name, int64_t default_); // retrieve a value if it exists
38 char* get(char *name, char *default_); // return 1 if it doesn't
40 Properties *properties; // list of defaults
41 char filename[1024]; // filename the defaults are stored in
44 #endif