SimGrid
3.16
Versatile Simulation of Distributed Systems
|
This is how to retrieve the values stored in the configuration set.
This is only intended to configurable code, naturally.
Note that those function return a pointer to the values actually stored in the set. Do not modify them unless you really know what you're doing. Likewise, do not free the strings after use, they are not copy of the data, but the data themselves.
Functions | |
int | xbt_cfg_get_int (const char *name) |
Retrieve an integer value of a variable (get a warning if not uniq) More... | |
double | xbt_cfg_get_double (const char *name) |
Retrieve a double value of a variable (get a warning if not uniq) More... | |
char * | xbt_cfg_get_string (const char *name) |
Retrieve a string value of a variable (get a warning if not uniq) More... | |
int | xbt_cfg_get_boolean (const char *name) |
Retrieve a boolean value of a variable (get a warning if not uniq) More... | |
int xbt_cfg_get_int | ( | const char * | key | ) |
Retrieve an integer value of a variable (get a warning if not uniq)
key | the name of the variable |
Returns the first value from the config set under the given name.
double xbt_cfg_get_double | ( | const char * | key | ) |
Retrieve a double value of a variable (get a warning if not uniq)
key | the name of the variable |
Returns the first value from the config set under the given name.
char* xbt_cfg_get_string | ( | const char * | key | ) |
Retrieve a string value of a variable (get a warning if not uniq)
key | the name of the variable |
Returns the first value from the config set under the given name. If there is more than one value, it will issue a warning. Returns nullptr if there is no value.
int xbt_cfg_get_boolean | ( | const char * | key | ) |
Retrieve a boolean value of a variable (get a warning if not uniq)
key | the name of the variable |
Returns the first value from the config set under the given name. If there is more than one value, it will issue a warning.