Changes between Version 2 and Version 3 of code/doc/ConfigValueContainer
- Timestamp:
- Feb 27, 2008, 8:38:35 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/doc/ConfigValueContainer
v2 v3 5 5 The [wiki:ConfigValueContainer] is a class that manages config-values. A config-value is a member-variable of a class that can be changed through the config-file. The config-file is usually ''orxonox.ini''. A new config-value can be defined by using the !SetConfigValue(varname, defvalue) macro (you have to include [wiki:CoreIncludes CoreIncludes.h] to use it), where ''varname'' is a member variable of a class. The macro-call must take place in the setConfigValues() function of this class. This allows the user to change the value of the variable ingame by using console-commands or the menu. 6 6 7 Every config-value has it's own [wiki:ConfigValueContainer]. The container is stored in a map inside the [wiki:Identifier] of the corresponding class. That way it's possible to iterate through all [wiki:ConfigValueContainer s] of a class.7 Every config-value has it's own [wiki:ConfigValueContainer]. The container is stored in a map inside the [wiki:Identifier] of the corresponding class. That way it's possible to iterate through all [wiki:ConfigValueContainer ConfigValueContainers] of a class. 8 8 9 Calling setConfigValues() of an object causes all [wiki:ConfigValueContainer s] of it's class to assign the stored values to the variables of the object. The values are initially read from the config-file but can be changed during the game by using console-commands or the menu. It's possible to change variables only temporary without saving the new value in the config-file, but usually changes are saved.9 Calling setConfigValues() of an object causes all [wiki:ConfigValueContainer ConfigValueContainers] of it's class to assign the stored values to the variables of the object. The values are initially read from the config-file but can be changed during the game by using console-commands or the menu. It's possible to change variables only temporary without saving the new value in the config-file, but usually changes are saved. 10 10 11 11 == Functions ==