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"
18 std::string name_; /* Unique name of this container */
20 Container(std::string name, std::string type_name, Container* father);
23 Type* type_; /* Type of this container */
25 std::map<std::string, Container*> children_;
26 sg_netpoint_t netpoint_ = nullptr;
28 static Container* byNameOrNull(std::string name);
29 static Container* byName(std::string name);
30 std::string getName() { return name_; }
31 const char* getCname() { return name_.c_str(); }
32 long long int getId() { return id_; }
33 void removeFromParent();
35 void logDestruction();
37 static Container* getRootContainer();
40 class NetZoneContainer : public Container {
42 NetZoneContainer(std::string name, unsigned int level, NetZoneContainer* father);
45 class RouterContainer : public Container {
47 RouterContainer(std::string name, Container* father);
50 class HostContainer : public Container {
52 HostContainer(simgrid::s4u::Host& host, NetZoneContainer* father);