SimGrid
3.13
Versatile Simulation of Distributed Systems
|
This is how to retrieve the values stored in the configuration set. More...
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... | |
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.
int xbt_cfg_get_int | ( | const char * | name | ) |
Retrieve an integer value of a variable (get a warning if not uniq)
name | 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. Consider using xbt_cfg_get_dynar() instead.
double xbt_cfg_get_double | ( | const char * | name | ) |
Retrieve a double value of a variable (get a warning if not uniq)
cfg | the config set |
name | 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. Consider using xbt_cfg_get_dynar() instead.
char* xbt_cfg_get_string | ( | const char * | name | ) |
Retrieve a string value of a variable (get a warning if not uniq)
cfg | the config set |
name | 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. Consider using xbt_cfg_get_dynar() instead. Returns NULL if there is no value.
int xbt_cfg_get_boolean | ( | const char * | name | ) |
Retrieve a boolean value of a variable (get a warning if not uniq)
cfg | the config set |
name | 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. Consider using xbt_cfg_get_dynar() instead.