100 #ifndef _ConfigValueIncludes_H__ 101 #define _ConfigValueIncludes_H__ 126 template <
class T,
class D,
class V>
135 return container->
getValue(variable,
object);
147 #define SetConfigValue(varname, defaultValue) \ 148 orxonox::setConfigValueGeneric(this, &varname, ConfigFileType::Settings, this->getIdentifier()->getName(), #varname, defaultValue) 160 #define SetConfigValueAlias(variable, entryName, defaultValue) \ 161 orxonox::setConfigValueGeneric(this, &variable, ConfigFileType::Settings, this->getIdentifier()->getName(), entryName, defaultValue) 175 #define SetConfigValueExternal(variable, sectionName, entryName, defaultValue) \ 176 orxonox::setConfigValueGeneric(this, &variable, ConfigFileType::Settings, sectionName, entryName, defaultValue) 191 template <
class T,
class V>
198 container->
getValue(variable,
object);
202 orxout(
user_warning, context::config) <<
"Couldn't reset config-value '" << entryName <<
"' in class '" 214 #define ResetConfigValue(varname) \ 215 orxonox::resetConfigValueGeneric(this, &varname, #varname) 232 #define ModifyConfigValueGeneric(object, variable, entryName, modifier, ...) \ 233 if (orxonox::ConfigValueContainer* container = ClassByObjectType(object)->getConfigValueContainer(entryName)) \ 235 container->modifier(__VA_ARGS__); \ 236 container->getValue(variable, object); \ 240 orxout(user_warning, context::config) << "Couldn't modify config-value '" << entryName << "' in class '" \ 241 << ClassByObjectType(object)->getName() << "', corresponding container doesn't exist." << endl; \ 254 #define ModifyConfigValue(varname, modifier, ...) \ 255 ModifyConfigValueGeneric(this, &varname, #varname, modifier, __VA_ARGS__) 269 #define ModifyConfigValueExternal(variable, entryName, modifier, ...) \ 270 ModifyConfigValueGeneric(this, &variable, entryName, modifier, __VA_ARGS__) The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables t...
Definition: Identifier.h:262
The ConfigValuecontainer contains all needed information about a configurable variable.
Definition: ConfigValueContainer.h:98
Definition: InputPrereqs.h:90
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
void resetConfigValueGeneric(T *object, V *variable, const std::string &entryName)
Resets a runtime configurable value to its default.
Definition: ConfigValueIncludes.h:192
ConfigValueContainer & setConfigValueGeneric(T *object, V *variable, ConfigFileType::Value type, const std::string §ionName, const std::string &entryName, const D &defaultValue)
Sets a runtime configurable value.
Definition: ConfigValueIncludes.h:127
Declaration of the ConfigValueContainer class, caches a config-value.
Value
Definition: CorePrereqs.h:113
Declaration of Identifier, definition of ClassIdentifier<T>; used to identify the class of an object...
static ClassIdentifier< T > * getIdentifier()
Returns the only instance of this class.
Definition: Identifier.h:329
false defaultValue(2, false).argumentCompleter(0
OutputStream & orxout(OutputLevel level=level::debug_output, const OutputContextContainer &context=context::undefined())
This helper function returns a reference to a commonly used instance of OutputStream.
Definition: Output.h:81
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Definition: InputPrereqs.h:105
Definition: InputPrereqs.h:78
bool reset()
Sets the value of the variable back to the default value and resets the config-file entry...
Definition: ConfigValueContainer.cc:254
ConfigValueContainer & getValue(T *value, C *object)
Returns the configured value.
Definition: ConfigValueContainer.h:147
Output level, used for warnings which are important for the user.
Definition: OutputDefinitions.h:92