©2004,2008 Jim E. Brooks http://www.palomino3d.org
[2007/12]
Configuration is input from 3 sources (in order of precedence):
The combined configuration is stored in a Conf object (C struct) which is per-module.
[2007/12]
The ConfTxt class retrieves static configuration that the user can edit. Textual configuration is read once at startup. The program does not modify it (unlike ConfBin).
ConfTxt is a primitive Template Method class. It reads a .conf file as a C++ stream and defers the processing of lines to the abstract ProcessField().
[2007/12] [2004/06]
The ConfBin class stores and retrieves program state that originates from execution (as opposed to static configuration).
The configuration files is considered binary (not intended to be user-editable) but is in fact composed of lines of text. The configuration is a set of key/value pairs. A value can be 1 of 3 types: int, float, string. The configuration file consists of lines of human-readable plain-text. Each line defines a key/value pair. The file terminates at a line containing "END". For example:
# palomino configuration (gfx::ConfigFile v2) [2007/12 old name survives since format hasn't changed] int collisions 1 int joystick 0 int joystick_axis3 1 int response_chase 0 int response_eye 0 double fog_density 0.50000000000000000000 double gui_zoom 1.00000000000000000000 string lod 3 MID END
Last modified: Mon Apr 7 11:33:06 EDT 2008