/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
Container* Container::root_container_ = nullptr; /* the root container */
std::map<std::string, Container*, std::less<>> Container::all_containers_; /* all created containers indexed by name */
Container* Container::root_container_ = nullptr; /* the root container */
std::map<std::string, Container*, std::less<>> Container::all_containers_; /* all created containers indexed by name */
{
xbt_assert(s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()), "Element '%s' not found", get_cname());
if (parent_) {
{
xbt_assert(s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()), "Element '%s' not found", get_cname());
if (parent_) {
throw TracingError(XBT_THROW_POINT,
xbt::string_printf("container %s already present in all_containers_", get_cname()));
throw TracingError(XBT_THROW_POINT,
xbt::string_printf("container %s already present in all_containers_", get_cname()));
{
XBT_DEBUG("destroy container %s", get_cname());
// Begin with destroying my own children
{
XBT_DEBUG("destroy container %s", get_cname());
// Begin with destroying my own children