Next: , Previous: Configuration SYNOPSIS, Up: Configuration   [Contents][Index]


10.22.3 Configuration DESCRIPTION

The primary purpose of the Configuration class is to parse a configuration file and allow the application to modify the internal data structure produced. All values are strings and are converted by the appropriate accessors. For instance the Boolean method will return numerical true (not zero) if the string either contains a number that is different from zero or the string true .

The ConfigDefaults type is a structure of two char pointers: the name of the configuration attribute and it’s value. The end of the array is the first entry that contains a null pointer instead of the attribute name. Numerical values must be in strings. For instance:

ConfigDefault* config_defaults = {
  { "wordlist_compress", "true" },
  { "wordlist_page_size", "8192" },
  { 0, 0 }
};

The additional fields of the ConfigDefault are purely informative.