/* 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)");
-long long int new_paje_id()
-{
- static long long int type_id = 0;
- return type_id++;
-}
-
-Container* Container::get_root()
-{
- return rootContainer;
-}
+Container* Container::root_container_ = nullptr; /* the root container */
+std::map<std::string, Container*, std::less<>> Container::all_containers_; /* all created containers indexed by name */
NetZoneContainer::NetZoneContainer(const std::string& name, unsigned int level, NetZoneContainer* father)
: Container::Container(name, "", father)
NetZoneContainer::NetZoneContainer(const std::string& name, unsigned int level, NetZoneContainer* father)
: Container::Container(name, "", father)
// obligation to dump previous events because they might reference the container that is about to be destroyed
last_timestamp_to_dump = SIMIX_get_clock();
// obligation to dump previous events because they might reference the container that is about to be destroyed
last_timestamp_to_dump = SIMIX_get_clock();
- auto cont = allContainers.find(name);
- return cont == allContainers.end() ? nullptr : cont->second;
+ auto cont = all_containers_.find(name);
+ return cont == all_containers_.end() ? nullptr : cont->second;
EntityValue::EntityValue(const std::string& name, const std::string& color, Type* father)
: name_(name), color_(color), father_(father)
{
EntityValue::EntityValue(const std::string& name, const std::string& color, Type* father)
: name_(name), color_(color), father_(father)
{