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"
19 std::string name_; /* Unique name of this container */
21 Container(std::string name, std::string type_name, Container* father);
24 Type* type_; /* Type of this container */
26 std::map<std::string, Container*> children_;
27 sg_netpoint_t netpoint_ = nullptr;
29 static Container* byNameOrNull(std::string name);
30 static Container* byName(std::string name);
31 std::string getName() { return name_; }
32 const char* getCname() { return name_.c_str(); }
33 long long int getId() { return id_; }
34 void removeFromParent();
36 void logDestruction();
38 StateType* getState(std::string name);
39 static Container* getRootContainer();
42 class NetZoneContainer : public Container {
44 NetZoneContainer(std::string name, unsigned int level, NetZoneContainer* father);
47 class RouterContainer : public Container {
49 RouterContainer(std::string name, Container* father);
52 class HostContainer : public Container {
54 HostContainer(simgrid::s4u::Host& host, NetZoneContainer* father);