- 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* addEventType(std::string name);
- Type* addLinkType(std::string name, Type* source, Type* dest);
- Type* addStateType(std::string name);
- Type* addVariableType(std::string name, std::string color);
-
- void logContainerTypeDefinition();
- void logVariableTypeDefinition();
- void logStateTypeDefinition();
- void logLinkTypeDefinition(simgrid::instr::Type* source, simgrid::instr::Type* dest);
- void logDefineEventType();
-
- Type* getChildOrNull(std::string name);
- static Type* containerNew(const char* name, Type* father);
-};
-
-//--------------------------------------------------
-class Value {
- std::string name_;
- std::string id_;
- std::string color_;
-
- explicit Value(std::string name, std::string color, Type* father);
-
-public:
- ~Value() = default;
- Type* father_;
- static Value* byNameOrCreate(std::string name, std::string color, Type* father);
- static Value* byName(std::string name, Type* father);
- const char* getCname() { return name_.c_str(); }
- const char* getId() { return id_.c_str(); }
- bool isColored() { return not color_.empty(); }
- void print();
-};
-
-//--------------------------------------------------
-enum e_container_types {
- INSTR_HOST,
- INSTR_LINK,
- INSTR_ROUTER,
- INSTR_AS,
- INSTR_SMPI,
- INSTR_MSG_VM,
- INSTR_MSG_PROCESS,
- INSTR_MSG_TASK
-};
-
-class Container {
- e_container_types kind_; /* This container is of what kind */
- int level_ = 0; /* Level in the hierarchy, root level is 0 */
-
-public:
- Container(std::string name, simgrid::instr::e_container_types kind, Container* father);
- virtual ~Container();
-
- sg_netpoint_t netpoint_ = nullptr;
- std::string name_; /* Unique name of this container */
- std::string id_; /* Unique id of this container */
- Type* type_; /* Type of this container */
- Container* father_;
- std::map<std::string, Container*> children_;
- static Container* byNameOrNull(std::string name);
- static Container* byName(std::string name);
- void removeFromParent();
- void logCreation();
- void logDestruction();
-};
-
-//--------------------------------------------------
-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();
-};
-
-//--------------------------------------------------
-class SetVariableEvent : public PajeEvent {
- double value;
-
-public:
- SetVariableEvent(double timestamp, Container* container, Type* type, double value);
- void print() override;
-};
-
-class AddVariableEvent : public PajeEvent {
- double value;
-
-public:
- AddVariableEvent(double timestamp, Container* container, Type* type, double value);
- void print() override;