SimGrid: Configuration type declaration and memory management

SimGrid 3.10 Versatile Simulation of Distributed Systems

- Home page
- Online documentation
- Dev's Corner

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Typedefs | Enumerations | Functions
Configuration type declaration and memory management
Configuration support

## Data Structures
struct | xbt_boolean_couple

## Typedefs
typedef void(* | xbt_cfg_cb_t )(const char *, int)
| Callback types. They get the name of the modified entry, and the position of the changed value.

## Enumerations
enum | e_xbt_cfgelm_type_t { xbt_cfgelm_int = 0, xbt_cfgelm_double, xbt_cfgelm_string, xbt_cfgelm_boolean, xbt_cfgelm_peer }
| possible content of each configuration cell More...

## Functions
xbt_cfg_t | xbt_cfg_new (void)
| Constructor.
void | xbt_cfg_cpy (xbt_cfg_t tocopy, xbt_cfg_t *whereto)
| Copy an existing configuration set.
void | xbt_cfg_free (xbt_cfg_t *cfg)
| Destructor.
void | xbt_cfg_dump (const char *name, const char *indent, xbt_cfg_t cfg)
| Dump a config set for debuging purpose.

## Detailed Description

## Enumeration Type Documentation

enum e_xbt_cfgelm_type_t

possible content of each configuration cell

Enumerator:

  xbt_cfgelm_int | int
  xbt_cfgelm_double | double
  xbt_cfgelm_string | char*
  xbt_cfgelm_boolean | int
  xbt_cfgelm_peer | both a char* (representing the peername) and an integer (representing the port)

## Function Documentation

xbt_cfg_t xbt_cfg_new | ( | void |  | ) |

Constructor.

Initialise a config set

void xbt_cfg_cpy | ( | xbt_cfg_t | tocopy,
|  | xbt_cfg_t * | whereto
| ) |  |

Copy an existing configuration set.

Parameters

  whereto | the config set to be created
  tocopy | the source data

This only copy the registrations, not the actual content

void xbt_cfg_dump | ( | const char * | name,
|  | const char * | indent,
|  | xbt_cfg_t | cfg
| ) |  |

Dump a config set for debuging purpose.

Parameters

  name | The name to give to this config set
  indent | what to write at the begining of each line (right number of spaces)
  cfg | the config set