Represents a configuration suitable for use with the Envir library.
This class extends cConfiguration with the following functionality:
- Methods for reading module parameters; cEnvir's readParameter() method delegates to them by default.
- Support for multiple configurations (enumeration, activation, etc.)
- Parameter Study support: run numbers, iteration variables, unrolling, etc.
- Other utility functions like dump()
- See also
- cEnvir::getConfigEx()
|
virtual void | initializeFrom (cConfiguration *bootConfig)=0 |
|
virtual const char * | getFileName () const =0 |
|
virtual void | validate (const char *ignorableConfigKeys=nullptr) const =0 |
|
|
virtual std::vector< std::string > | getConfigNames ()=0 |
|
virtual void | activateConfig (const char *configName, int runNumber=0)=0 |
|
virtual std::string | getConfigDescription (const char *configName) const =0 |
|
virtual std::vector< std::string > | getBaseConfigs (const char *configName) const =0 |
|
virtual std::vector< std::string > | getConfigChain (const char *configName) const =0 |
|
virtual int | getNumRunsInConfig (const char *configName) const =0 |
|
virtual std::vector< RunInfo > | unrollConfig (const char *configName) const =0 |
|
virtual const char * | getActiveConfigName () const =0 |
|
virtual int | getActiveRunNumber () const =0 |
|
virtual const char * | getVariable (const char *varname) const =0 |
|
virtual std::vector< const char * > | getIterationVariableNames () const =0 |
|
virtual std::vector< const char * > | getPredefinedVariableNames () const =0 |
|
virtual const char * | getVariableDescription (const char *varname) const =0 |
|
virtual void | dump () const =0 |
|
|
virtual std::vector< const char * > | getMatchingConfigKeys (const char *pattern) const =0 |
|
virtual const char * | getParameterValue (const char *moduleFullPath, const char *paramName, bool hasDefaultValue) const =0 |
|
virtual const KeyValue & | getParameterEntry (const char *moduleFullPath, const char *paramName, bool hasDefaultValue) const =0 |
|
virtual std::vector< const char * > | getKeyValuePairs (int flags=FILT_ALL) const =0 |
|
virtual std::vector< const char * > | getMatchingPerObjectConfigKeySuffixes (const char *objectFullPath, const char *keySuffixPattern) const =0 |
|
virtual const char * | getConfigValue (const char *key) const =0 |
|
virtual const KeyValue & | getConfigEntry (const char *key) const =0 |
|
virtual const char * | getPerObjectConfigValue (const char *objectFullPath, const char *keySuffix) const =0 |
|
virtual const KeyValue & | getPerObjectConfigEntry (const char *objectFullPath, const char *keySuffix) const =0 |
|
virtual const char * | getConfigValue (cConfigOption *option, const char *fallbackValue=nullptr) const |
|
virtual const char * | getAsCustom (cConfigOption *option, const char *fallbackValue=nullptr) const |
|
virtual bool | getAsBool (cConfigOption *option, bool fallbackValue=false) const |
|
virtual long | getAsInt (cConfigOption *option, long fallbackValue=0) const |
|
virtual double | getAsDouble (cConfigOption *option, double fallbackValue=0) const |
|
virtual std::string | getAsString (cConfigOption *option, const char *fallbackValue="") const |
|
virtual std::string | getAsFilename (cConfigOption *option) const |
|
virtual std::vector< std::string > | getAsFilenames (cConfigOption *option) const |
|
virtual std::string | getAsPath (cConfigOption *option) const |
|
virtual const char * | getPerObjectConfigValue (const char *objectFullPath, cConfigOption *option, const char *fallbackValue=nullptr) const |
|
virtual const char * | getAsCustom (const char *objectFullPath, cConfigOption *option, const char *fallbackValue=nullptr) const |
|
virtual bool | getAsBool (const char *objectFullPath, cConfigOption *option, bool fallbackValue=false) const |
|
virtual long | getAsInt (const char *objectFullPath, cConfigOption *option, long fallbackValue=0) const |
|
virtual double | getAsDouble (const char *objectFullPath, cConfigOption *option, double fallbackValue=0) const |
|
virtual std::string | getAsString (const char *objectFullPath, cConfigOption *option, const char *fallbackValue="") const |
|
virtual std::string | getAsFilename (const char *objectFullPath, cConfigOption *option) const |
|
virtual std::vector< std::string > | getAsFilenames (const char *objectFullPath, cConfigOption *option) const |
|
virtual std::string | getAsPath (const char *objectFullPath, cConfigOption *option) const |
|
virtual const char * | substituteVariables (const char *value) const =0 |
|
| cObject () |
|
| cObject (const cObject &other)=default |
|
virtual | ~cObject () |
|
virtual const char * | getClassName () const |
|
virtual const char * | getName () const |
|
bool | isName (const char *s) const |
|
virtual const char * | getFullName () const |
|
virtual std::string | getFullPath () const |
|
virtual std::string | getClassAndFullName () const |
|
virtual std::string | getClassAndFullPath () const |
|
const cObject * | getThisPtr () const |
|
virtual std::string | str () const |
|
virtual std::ostream & | printOn (std::ostream &os) const |
|
virtual cObject * | dup () const |
|
virtual void | parsimPack (cCommBuffer *buffer) const |
|
virtual void | parsimUnpack (cCommBuffer *buffer) |
|
virtual cObject * | getOwner () const |
|
virtual bool | isOwnedObject () const |
|
virtual bool | isSoftOwner () const |
|
virtual void | forEachChild (cVisitor *v) |
|
cObject * | findObject (const char *name, bool deep=true) |
|
virtual cClassDescriptor * | getDescriptor () const |
|
void | copyNotSupported () const |
|
|
static bool | parseBool (const char *s, const char *defaultValue, bool fallbackValue=false) |
|
static long | parseLong (const char *s, const char *defaultValue, long fallbackValue=0) |
|
static double | parseDouble (const char *s, const char *unit, const char *defaultValue, double fallbackValue=0) |
|
static std::string | parseString (const char *s, const char *defaultValue, const char *fallbackValue="") |
|
static std::string | parseFilename (const char *s, const char *baseDir, const char *defaultValue) |
|
static std::vector< std::string > | parseFilenames (const char *s, const char *baseDir, const char *defaultValue) |
|
static std::string | adjustPath (const char *s, const char *baseDir, const char *defaultValue) |
|
virtual void | take (cOwnedObject *obj) |
|
virtual void | drop (cOwnedObject *obj) |
|
void | dropAndDelete (cOwnedObject *obj) |
|
virtual const char* getVariable |
( |
const char * |
varname | ) |
const |
|
pure virtual |
After activating a configuration, this method can be used to query iteration variables and predefined variables. These are the variables that can be referred to using the "${...}" syntax in the configuration. If the variable does not exist, nullptr is returned.
Some of the predefined variables are: "configname", "runnumber", "network", "processid", "datetime", "runid", "repetition", "iterationvars"; these names are also available as symbolic constants, see CFGVAR_CONFIGNAME and other CFGVAR_xxx names.