-/**
- * @brief Parse a string and register the stuff described.
- *
- * @param cfg the config set
- * @param 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
- */
-void xbt_cfg_register_str(xbt_cfg_t * cfg, const char *entry)
-{
- char *entrycpy = xbt_strdup(entry);
- char *tok;
-
- e_xbt_cfgelm_type_t type;
- XBT_DEBUG("Register string '%s'", entry);
-
- tok = strchr(entrycpy, ':');
- xbt_assert(tok, "Invalid config element descriptor: %s; Should be <name>:<type>", entry);
- *(tok++) = '\0';
-
- for (type = (e_xbt_cfgelm_type_t)0; type < xbt_cfgelm_type_count && strcmp(tok, xbt_cfgelm_type_name[type]); increment(type));
- xbt_assert(type < xbt_cfgelm_type_count,
- "Invalid type in config element descriptor: %s; Should be one of 'string', 'int' or 'double'.", entry);
-
- xbt_cfg_register(cfg, entrycpy, NULL, type, NULL);
-
- free(entrycpy); /* strdup'ed by dict mechanism, but cannot be const */
-}
-
-void xbt_cfg_aliases(void) { simgrid_config->showAliases(); }
-void xbt_cfg_help(void) { simgrid_config->help(); }
-
-static simgrid::config::ConfigurationElement* xbt_cfgelm_get(xbt_cfg_t cfg, const char *name, e_xbt_cfgelm_type_t type)
-{
- simgrid::config::ConfigurationElement* res = (*cfg)[name];
-
- if (!res) {
- xbt_cfg_help();
- fflush(stdout);
- THROWF(not_found_error, 0, "No registered variable '%s' in this config set.", name);
- }
-
- xbt_assert(type == xbt_cfgelm_any || res->type == type,
- "You tried to access to the config element %s as an %s, but its type is %s.",
- name, xbt_cfgelm_type_name[type], xbt_cfgelm_type_name[res->type]);
- return res;
-}