SimGrid
3.16
Versatile Simulation of Distributed Systems
|
This is the only interface you should use unless you want to let your own code become configurable with this.
If the variable accept at most one value, those functions replace the current value with the provided one. If max>1, the provided value is appended to the list.
string values are strdup'ed before use, so you can (and should) free your copy
Typedefs | |
typedef void * | xbt_cfg_t |
Configuration set's data type is opaque. More... | |
Functions | |
void | xbt_cfg_set_parse (const char *options) |
Add values parsed from a string into a config set. More... | |
void | xbt_cfg_set_int (const char *name, int val) |
Set an integer value to name within cfg. More... | |
void | xbt_cfg_set_double (const char *name, double val) |
Set or add a double value to name within cfg. More... | |
void | xbt_cfg_set_string (const char *name, const char *val) |
Set or add a string value to name within cfg. More... | |
void | xbt_cfg_set_boolean (const char *name, const char *val) |
Set or add a boolean value to name within cfg. More... | |
void | xbt_cfg_set_as_string (const char *name, const char *val) |
Set the value of a variable, using the string representation of that value. More... | |
void | xbt_cfg_setdefault_int (const char *name, int val) |
Set an integer value to name within cfg if it wasn't changed yet. More... | |
void | xbt_cfg_setdefault_double (const char *name, double val) |
Set an integer value to name within cfg if it wasn't changed yet. More... | |
void | xbt_cfg_setdefault_string (const char *name, const char *val) |
Set a string value to name within cfg if it wasn't changed yet. More... | |
void | xbt_cfg_setdefault_boolean (const char *name, const char *val) |
Set an boolean value to name within cfg if it wasn't changed yet. More... | |
int | xbt_cfg_is_default_value (const char *name) |
Return if configuration is set by default. More... | |
void xbt_cfg_set_parse | ( | const char * | options | ) |
Add values parsed from a string into a config set.
options | a string containing the content to add to the config set. This is a '\t',' ' or '\n' or ',' separated list of variables. Each individual variable is like "[name]:[value]" where [name] is the name of an already registered variable, and [value] conforms to the data type under which this variable was registered. |
void xbt_cfg_set_int | ( | const char * | key, |
int | value | ||
) |
Set an integer value to name within cfg.
key | the name of the variable |
value | the value of the variable |
void xbt_cfg_set_double | ( | const char * | key, |
double | value | ||
) |
Set or add a double value to name within cfg.
key | the name of the variable |
value | the double to set |
void xbt_cfg_set_string | ( | const char * | key, |
const char * | value | ||
) |
Set or add a string value to name within cfg.
key | the name of the variable |
value | the value to be added |
void xbt_cfg_set_boolean | ( | const char * | key, |
const char * | value | ||
) |
Set or add a boolean value to name within cfg.
key | the name of the variable |
value | the value of the variable |
void xbt_cfg_set_as_string | ( | const char * | key, |
const char * | value | ||
) |
Set the value of a variable, using the string representation of that value.
key | name of the variable to modify |
value | string representation of the value to set |
void xbt_cfg_setdefault_int | ( | const char * | key, |
int | value | ||
) |
Set an integer value to name within cfg if it wasn't changed yet.
This is useful to change the default value of a variable while allowing users to override it with command line arguments
void xbt_cfg_setdefault_double | ( | const char * | key, |
double | value | ||
) |
Set an integer value to name within cfg if it wasn't changed yet.
This is useful to change the default value of a variable while allowing users to override it with command line arguments
void xbt_cfg_setdefault_string | ( | const char * | key, |
const char * | value | ||
) |
Set a string value to name within cfg if it wasn't changed yet.
This is useful to change the default value of a variable while allowing users to override it with command line arguments
void xbt_cfg_setdefault_boolean | ( | const char * | key, |
const char * | value | ||
) |
Set an boolean value to name within cfg if it wasn't changed yet.
This is useful to change the default value of a variable while allowing users to override it with command line arguments
int xbt_cfg_is_default_value | ( | const char * | name | ) |
Return if configuration is set by default.