- }else{
- //otherwise, the name is its kind
- char typeNameBuff[INSTR_DEFAULT_STR_SIZE];
- switch (newContainer->kind){
- case INSTR_HOST:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "HOST");
- break;
- case INSTR_LINK:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "LINK");
- break;
- case INSTR_ROUTER:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "ROUTER");
- break;
- case INSTR_SMPI:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MPI");
- break;
- case INSTR_MSG_PROCESS:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_PROCESS");
- break;
- case INSTR_MSG_VM:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_VM");
- break;
- case INSTR_MSG_TASK:
- snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_TASK");
- break;
- default:
- THROWF (tracing_error, 0, "new container kind is unknown.");
- break;
- }
- Type* type = Type::getOrNull (typeNameBuff, newContainer->father->type);
- if (type == nullptr){
- newContainer->type = Type::containerNew (typeNameBuff, newContainer->father->type);
- }else{
- newContainer->type = type;
- }
- }
- newContainer->children = xbt_dict_new_homogeneous(nullptr);
- if (newContainer->father){
- xbt_dict_set(newContainer->father->children, newContainer->name, newContainer, nullptr);
- LogContainerCreation(newContainer);