+
+/** @brief Retrieve one of the integer value of a variable */
+xbt_error_t
+xbt_cfg_get_int_at(xbt_cfg_t cfg,
+ const char *name,
+ int pos,
+ int *val) {
+
+ xbt_cfgelm_t variable;
+ xbt_error_t errcode;
+
+ TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+ *val = xbt_dynar_get_as(variable->content, pos, int);
+ return no_error;
+}
+
+/** @brief Retrieve one of the double value of a variable */
+xbt_error_t
+xbt_cfg_get_double_at(xbt_cfg_t cfg,
+ const char *name,
+ int pos,
+ double *val) {
+
+ xbt_cfgelm_t variable;
+ xbt_error_t errcode;
+
+ TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+ *val = xbt_dynar_get_as(variable->content, pos, double);
+ return no_error;
+}
+
+
+/** @brief Retrieve one of the string value of a variable */
+xbt_error_t
+xbt_cfg_get_string_at(xbt_cfg_t cfg,
+ const char *name,
+ int pos,
+ char **val) {
+
+ xbt_cfgelm_t variable;
+ xbt_error_t errcode;
+
+ TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+ *val = xbt_dynar_get_as(variable->content, pos, char*);
+ return no_error;
+}
+
+/** @brief Retrieve one of the host value of a variable */
+xbt_error_t
+xbt_cfg_get_host_at(xbt_cfg_t cfg,
+ const char *name,
+ int pos,
+ char **host,
+ int *port) {
+
+ xbt_cfgelm_t variable;
+ xbt_error_t errcode;
+ xbt_host_t *val;
+
+ TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+ val = xbt_dynar_get_ptr(variable->content, pos);
+ *port = val->port;
+ *host = val->name;
+ return no_error;
+}