SimGrid  3.14.159
Versatile Simulation of Distributed Systems

Detailed Description

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 voidxbt_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...
 

Typedef Documentation

◆ xbt_cfg_t

typedef void* xbt_cfg_t

Configuration set's data type is opaque.

Function Documentation

◆ xbt_cfg_set_parse()

void xbt_cfg_set_parse ( const char *  options)

Add values parsed from a string into a config set.

Parameters
optionsa 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.

◆ xbt_cfg_set_int()

void xbt_cfg_set_int ( const char *  key,
int  value 
)

Set an integer value to name within cfg.

Parameters
keythe name of the variable
valuethe value of the variable

◆ xbt_cfg_set_double()

void xbt_cfg_set_double ( const char *  key,
double  value 
)

Set or add a double value to name within cfg.

Parameters
keythe name of the variable
valuethe double to set

◆ xbt_cfg_set_string()

void xbt_cfg_set_string ( const char *  key,
const char *  value 
)

Set or add a string value to name within cfg.

Parameters
keythe name of the variable
valuethe value to be added

◆ xbt_cfg_set_boolean()

void xbt_cfg_set_boolean ( const char *  key,
const char *  value 
)

Set or add a boolean value to name within cfg.

Parameters
keythe name of the variable
valuethe value of the variable

◆ xbt_cfg_set_as_string()

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.

Parameters
keyname of the variable to modify
valuestring representation of the value to set

◆ xbt_cfg_setdefault_int()

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

◆ xbt_cfg_setdefault_double()

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

◆ xbt_cfg_setdefault_string()

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

◆ xbt_cfg_setdefault_boolean()

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

◆ xbt_cfg_is_default_value()

int xbt_cfg_is_default_value ( const char *  name)

Return if configuration is set by default.