printf ("%s %s:%d\n",indent,hval->name,hval->port);
}
break;
printf ("%s %s:%d\n",indent,hval->name,hval->port);
}
break;
res = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
res = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
THROW1(not_found_error,0,
"No registered variable '%s' in this config set",name);
}
THROW1(not_found_error,0,
"No registered variable '%s' in this config set",name);
}
variable = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
variable = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
THROW1(not_found_error,0,
"Can't get the type of '%s' since this variable does not exist",name);
}
THROW1(not_found_error,0,
"Can't get the type of '%s' since this variable does not exist",name);
}
type = xbt_cfg_get_type(cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
type = xbt_cfg_get_type(cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
THROW1(not_found_error,0,"Can't set the property '%s' since it's not registered",name);
}
RETHROW;
THROW1(not_found_error,0,"Can't set the property '%s' since it's not registered",name);
}
RETHROW;
THROW1(not_found_error,0,"No registrated variable corresponding to '%s'.",name);
}
RETHROW;
THROW1(not_found_error,0,"No registrated variable corresponding to '%s'.",name);
}
RETHROW;
xbt_cfg_set_host(xbt_cfg_t cfg,const char*name,
const char *host,int port) {
xbt_cfgelm_t variable;
xbt_cfg_set_host(xbt_cfg_t cfg,const char*name,
const char *host,int port) {
xbt_cfgelm_t variable;
VERB3("Configuration setting: %s=%s:%d",name,host,port);
VERB3("Configuration setting: %s=%s:%d",name,host,port);
xbt_cfg_rm_host(xbt_cfg_t cfg,const char*name, const char *host,int port) {
xbt_cfgelm_t variable;
int cpt;
xbt_cfg_rm_host(xbt_cfg_t cfg,const char*name, const char *host,int port) {
xbt_cfgelm_t variable;
int cpt;
THROW1(not_found_error,0,
"Can't empty '%s' since this config element does not exist", name);
}
THROW1(not_found_error,0,
"Can't empty '%s' since this config element does not exist", name);
}
void xbt_cfg_get_host (xbt_cfg_t cfg, const char *name,
char **host, int *port) {
xbt_cfgelm_t variable;
void xbt_cfg_get_host (xbt_cfg_t cfg, const char *name,
char **host, int *port) {
xbt_cfgelm_t variable;
variable = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
variable = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
if (e.category == not_found_error) {
THROW1(not_found_error,0,
"No registered variable %s in this config set",name);
}
THROW1(not_found_error,0,
"No registered variable %s in this config set",name);
}
char **host, int *port) {
xbt_cfgelm_t variable = xbt_cfgelm_get(cfg,name,xbt_cfgelm_int);
char **host, int *port) {
xbt_cfgelm_t variable = xbt_cfgelm_get(cfg,name,xbt_cfgelm_int);
if (e.category != mismatch_error ||
strncmp(e.msg,"Config elem speed needs",strlen("Config elem speed needs")))
xbt_test_fail1("Got an exception. msg=%s",e.msg);
if (e.category != mismatch_error ||
strncmp(e.msg,"Config elem speed needs",strlen("Config elem speed needs")))
xbt_test_fail1("Got an exception. msg=%s",e.msg);
strncmp(e.msg,"Cannot add value 34 to the config elem speed",
strlen("Config elem speed needs")))
xbt_test_fail1("Got an exception. msg=%s",e.msg);
strncmp(e.msg,"Cannot add value 34 to the config elem speed",
strlen("Config elem speed needs")))
xbt_test_fail1("Got an exception. msg=%s",e.msg);