The Read Configuration File code is contained in this namespace.
More...
|
| ReadConfiguration (filename, configurationArrayName) |
| This procedure reads in the configuration file named by the filename into the array named by configurationArrayName. More...
|
|
| IsEven (i) |
| Checks if its argument is an even number. More...
|
|
| WriteConfiguration (filename, configurationArrayName) |
| This procedure writes the configuration contianed in configurationArrayName to the file named by the filename. More...
|
|
| ConfigurationType (...) |
| This macro defines the body of a snit::type that implements a program's global configuration (or preferences). More...
|
|
The Read Configuration File code is contained in this namespace.
- Author
- Robert Heller <heller@deepsoft.com>
Package provided
ReadConfiguration 1.0
◆ ConfigurationType()
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.
- Author
- Robert Heller <heller@deepsoft.com>
◆ IsEven()
ReadConfiguration::IsEven |
( |
i |
| ) |
|
Checks if its argument is an even number.
- Parameters
-
- Author
- Robert Heller <heller@deepsoft.com>
◆ ReadConfiguration()
ReadConfiguration::ReadConfiguration |
( |
filename |
, |
|
|
configurationArrayName |
|
|
) |
| |
This procedure reads in the configuration file named by the filename into the array named by configurationArrayName.
- Parameters
-
filename | The name of the configuration file. |
configurationArrayName | The name of the array to hold the configuration. |
- Author
- Robert Heller <heller@deepsoft.com>
◆ WriteConfiguration()
ReadConfiguration::WriteConfiguration |
( |
filename |
, |
|
|
configurationArrayName |
|
|
) |
| |
This procedure writes the configuration contianed in configurationArrayName to the file named by the filename.
- Parameters
-
filename | The name of the configuration file. |
configurationArrayName | The name of the array holding the configuration. |
- Author
- Robert Heller <heller@deepsoft.com>