Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6368 for code/branches


Ignore:
Timestamp:
Dec 17, 2009, 10:49:16 AM (15 years ago)
Author:
rgrieder
Message:

Added config value macro "SetConfigValueAlias" where you can specify the entry name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/ConfigValueIncludes.h

    r6243 r6368  
    8484    orxonox::setConfigValueGeneric(this, &varname, ConfigFileType::Settings, this->getIdentifier()->getName(), #varname, defaultValue)
    8585
     86/** Sets a runtime configurable value (simplified macro version of setConfigValueGeneric)
     87    If the container for the value doesn't yet exist, a new one is created.
     88    Also, the @a varname argument will be modified and set to the new value (default or from ini file).
     89@param variable
     90    Variable name as C++ identifier.
     91@param entryName
     92    Name of the entry in the ini file (e.g. [MySection] myValue)
     93@param defaultValue
     94    Value to be used if it cannot be read from the ini file
     95*/
     96#define SetConfigValueAlias(variable, entryName, defaultValue) \
     97    orxonox::setConfigValueGeneric(this, &variable, ConfigFileType::Settings, this->getIdentifier()->getName(), entryName, defaultValue)
     98
    8699
    87100namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.