- const char* getCname() { return name_.c_str(); }
- const char* getId() { return id_.c_str(); }
- e_entity_types getKind() { return kind_; }
- bool isColored() { return not color_.empty(); }
-
- Type* byName(std::string name);
-
- Type* getOrCreateContainerType(std::string name);
- Type* getOrCreateEventType(std::string name);
- Type* getOrCreateLinkType(std::string name, Type* source, Type* dest);
- Type* getOrCreateStateType(std::string name);
- Type* getOrCreateVariableType(std::string name, std::string color);
-
- void addEntityValue(std::string name, std::string color);
- void addEntityValue(std::string name);
- Value* getEntityValue(std::string name);
-
- void logContainerTypeDefinition();
- void logVariableTypeDefinition();
- void logStateTypeDefinition();
- void logLinkTypeDefinition(simgrid::instr::Type* source, simgrid::instr::Type* dest);
- void logDefineEventType();
-
- static Type* createRootType();
- static Type* getRootType();
-};
-
-class Value {
- std::string name_;
- std::string id_;
- std::string color_;
- Type* father_;
-
-public:
- explicit Value(std::string name, std::string color, Type* father);
- ~Value();
- const char* getCname() { return name_.c_str(); }
- const char* getId() { return id_.c_str(); }
- bool isColored() { return not color_.empty(); }
- void print();
-};
-
-class Container {
- long long int id_;
- std::string name_; /* Unique name of this container */
-public:
- Container(std::string name, std::string type_name, Container* father);
- virtual ~Container();
-
- Type* type_; /* Type of this container */
- Container* father_;
- std::map<std::string, Container*> children_;
- sg_netpoint_t netpoint_ = nullptr;
-
- static Container* byNameOrNull(std::string name);
- static Container* byName(std::string name);
- std::string getName() { return name_; }
- const char* getCname() { return name_.c_str(); }
- long long int getId() { return id_; }
- void removeFromParent();
- void logCreation();
- void logDestruction();
-
- static Container* getRootContainer();
-};
-
-class NetZoneContainer : public Container {
-public:
- NetZoneContainer(std::string name, unsigned int level, NetZoneContainer* father);
-};
-
-class RouterContainer : public Container {
-public:
- RouterContainer(std::string name, Container* father);
-};
-
-class HostContainer : public Container {
-public:
- HostContainer(simgrid::s4u::Host& host, NetZoneContainer* father);
-};
-
-class PajeEvent {
-protected:
- Container* container;
- Type* type;
-
-public:
- double timestamp_;
- e_event_type eventType_;
- PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType)
- : container(container), type(type), timestamp_(timestamp), eventType_(eventType){};
- virtual void print() = 0;
- virtual ~PajeEvent();
- void insertIntoBuffer();