The Read Configuration File code is contained in this namespace.
ReadConfiguration::ConfigurationType |
( |
|
... | ) |
|
This macro defines the body of a snit::type that implements a program's global configuration (or preferences). The argument list is a set of configuration variable defination lists. Each list contains four elements: the label, the key list name (a one or two element list), the type (one of directory, infile, outfile, string, enumerated, integer, double, or color), and the default value. Enumerated types have an additional (fifth) element, the set of possible values. Numerical types (double and integer) have a range of values as a fifth element. This macro should only be called inside a snit::type defination.
The configuration (aka preferences) are stored in the user's home directory. The file name under UNIX (including MacOSX) starts with a dot and contains the application rootname (from argv0). Under MS-Windows, the file name does not start with a dot. Instead .rc is appended.
- Parameters
-
... | The configuration variable definitions. |
- Type methods defined:
- load Load the configuration.
- save Save the configuration.
- edit Edit the configuration with a popup dialog.
- getkeyoption Get a keyed option. Takes two arguments.
- getoption Get a non-keyed option. Takes one argument.
- getanonoymous Gets the anonoymous option. Takes no arguments.