: name_(name), kind_(kind), father_(father)
{
static long long int container_id = 0;
: name_(name), kind_(kind), father_(father)
{
static long long int container_id = 0;
this->netpoint_ = sg_host_by_name(name.c_str())->pimpl_netpoint;
xbt_assert(this->netpoint_, "Element '%s' not found", name.c_str());
break;
this->netpoint_ = sg_host_by_name(name.c_str())->pimpl_netpoint;
xbt_assert(this->netpoint_, "Element '%s' not found", name.c_str());
break;
this->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
xbt_assert(this->netpoint_, "Element '%s' not found", name.c_str());
break;
this->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
xbt_assert(this->netpoint_, "Element '%s' not found", name.c_str());
break;
this->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
xbt_assert(this->netpoint_, "Element '%s' not found", name.c_str());
break;
this->netpoint_ = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(name);
xbt_assert(this->netpoint_, "Element '%s' not found", name.c_str());
break;
//if this container is of an AS, its type name depends on its level
char as_typename[INSTR_DEFAULT_STR_SIZE];
snprintf(as_typename, INSTR_DEFAULT_STR_SIZE, "L%d", this->level_);
if (this->father_) {
this->type_ = this->father_->type_->getChildOrNull(as_typename);
if (this->type_ == nullptr) {
//if this container is of an AS, its type name depends on its level
char as_typename[INSTR_DEFAULT_STR_SIZE];
snprintf(as_typename, INSTR_DEFAULT_STR_SIZE, "L%d", this->level_);
if (this->father_) {
this->type_ = this->father_->type_->getChildOrNull(as_typename);
if (this->type_ == nullptr) {
}
} else {
//otherwise, the name is its kind
char typeNameBuff[INSTR_DEFAULT_STR_SIZE];
switch (this->kind_) {
}
} else {
//otherwise, the name is its kind
char typeNameBuff[INSTR_DEFAULT_STR_SIZE];
switch (this->kind_) {
snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_TASK");
break;
default:
THROWF (tracing_error, 0, "new container kind is unknown.");
break;
}
snprintf (typeNameBuff, INSTR_DEFAULT_STR_SIZE, "MSG_TASK");
break;
default:
THROWF (tracing_error, 0, "new container kind is unknown.");
break;
}
XBT_DEBUG("Add container name '%s'", this->name_.c_str());
//register NODE types for triva configuration
XBT_DEBUG("Add container name '%s'", this->name_.c_str());
//register NODE types for triva configuration
{
XBT_DEBUG("destroy container %s", name_.c_str());
// Begin with destroying my own children
{
XBT_DEBUG("destroy container %s", name_.c_str());
// Begin with destroying my own children
if (ret == nullptr)
THROWF(tracing_error, 1, "container with name %s not found", name.c_str());
return ret;
}
if (ret == nullptr)
THROWF(tracing_error, 1, "container with name %s not found", name.c_str());
return ret;
}