1 /* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef INSTR_PAJE_CONTAINERS_HPP
7 #define INSTR_PAJE_CONTAINERS_HPP
9 #include "src/instr/instr_private.hpp"
17 std::string name_; /* Unique name of this container */
19 Container(std::string name, std::string type_name, Container* father);
22 Type* type_; /* Type of this container */
24 std::map<std::string, Container*> children_;
25 sg_netpoint_t netpoint_ = nullptr;
27 static Container* byNameOrNull(std::string name);
28 static Container* byName(std::string name);
29 std::string getName() { return name_; }
30 const char* getCname() { return name_.c_str(); }
31 long long int getId() { return id_; }
32 void removeFromParent();
34 void logDestruction();
36 static Container* getRootContainer();
39 class NetZoneContainer : public Container {
41 NetZoneContainer(std::string name, unsigned int level, NetZoneContainer* father);
44 class RouterContainer : public Container {
46 RouterContainer(std::string name, Container* father);
49 class HostContainer : public Container {
51 HostContainer(simgrid::s4u::Host& host, NetZoneContainer* father);