This how to add new variables to an existing configuration set.
More...
|
void | xbt_cfg_register_double (const char *name, double default_val, xbt_cfg_cb_t cb_set, const char *desc) |
|
void | xbt_cfg_register_int (const char *name, int default_val, xbt_cfg_cb_t cb_set, const char *desc) |
|
void | xbt_cfg_register_string (const char *name, const char *default_val, xbt_cfg_cb_t cb_set, const char *desc) |
|
void | xbt_cfg_register_boolean (const char *name, const char *default_val, xbt_cfg_cb_t cb_set, const char *desc) |
|
void | xbt_cfg_register_alias (const char *newname, const char *oldname) |
|
void | xbt_cfg_register_str (xbt_cfg_t *cfg, const char *entry) |
| Parse a string and register the stuff described. More...
|
|
void | xbt_cfg_aliases (void) |
| Displays the declared aliases and their description. More...
|
|
void | xbt_cfg_help (void) |
| Displays the declared options and their description. More...
|
|
e_xbt_cfgelm_type_t | xbt_cfg_get_type (xbt_cfg_t cfg, const char *name) |
| Get the type of this variable in that configuration set. More...
|
|
This how to add new variables to an existing configuration set.
Use it to make your code configurable.
void xbt_cfg_register_double |
( |
const char * |
name, |
|
|
double |
default_val, |
|
|
xbt_cfg_cb_t |
cb_set, |
|
|
const char * |
desc |
|
) |
| |
void xbt_cfg_register_int |
( |
const char * |
name, |
|
|
int |
default_val, |
|
|
xbt_cfg_cb_t |
cb_set, |
|
|
const char * |
desc |
|
) |
| |
void xbt_cfg_register_string |
( |
const char * |
name, |
|
|
const char * |
default_val, |
|
|
xbt_cfg_cb_t |
cb_set, |
|
|
const char * |
desc |
|
) |
| |
void xbt_cfg_register_boolean |
( |
const char * |
name, |
|
|
const char * |
default_val, |
|
|
xbt_cfg_cb_t |
cb_set, |
|
|
const char * |
desc |
|
) |
| |
void xbt_cfg_register_alias |
( |
const char * |
newname, |
|
|
const char * |
oldname |
|
) |
| |
void xbt_cfg_register_str |
( |
xbt_cfg_t * |
cfg, |
|
|
const char * |
entry |
|
) |
| |
Parse a string and register the stuff described.
- Parameters
-
cfg | the config set |
entry | a string describing the element to register |
The string may consist in several variable descriptions separated by a space. Each of them must use the following syntax: <name>:<type> with type being one of 'string','int','bool' or 'double'.
Note that this does not allow to set the description, so you should prefer the other interface
Displays the declared aliases and their description.
Displays the declared options and their description.
Get the type of this variable in that configuration set.
- Parameters
-
cfg | the config set |
name | the name of the element |
- Returns
- the type of the given element