X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/927aadad9506fd447e8c1fdb8d96151720143a84..390c4ee50cea7f1cb52ffc4bd7435a7ad4e9cc75:/src/instr/instr_paje_events.hpp diff --git a/src/instr/instr_paje_events.hpp b/src/instr/instr_paje_events.hpp index c3f43c3d95..a3a9522085 100644 --- a/src/instr/instr_paje_events.hpp +++ b/src/instr/instr_paje_events.hpp @@ -7,6 +7,7 @@ #define INSTR_PAJE_EVENTS_HPP #include "src/instr/instr_private.hpp" +#include #include namespace simgrid { @@ -38,15 +39,14 @@ enum e_event_type : unsigned int { class PajeEvent { Container* container_; Type* type_; - protected: - Type* getType() { return type_; } Container* getContainer() { return container_; } 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){}; + std::stringstream stream_; + + PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType); virtual ~PajeEvent() = default; virtual void print() = 0; void insertIntoBuffer(); @@ -56,18 +56,20 @@ class VariableEvent : public PajeEvent { double value; public: - VariableEvent(double timestamp, Container* container, Type* type, e_event_type event_type, double value); + VariableEvent(double timestamp, Container* container, Type* type, e_event_type event_type, double value) + : PajeEvent::PajeEvent(container, type, timestamp, event_type), value(value) + { + } void print() override; }; class StateEvent : public PajeEvent { EntityValue* value; - std::string filename; - int linenumber = 0; - TIData* extra_ = nullptr; + std::string filename = "(null)"; + int linenumber = -1; + TIData* extra_; public: - StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value); StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, TIData* extra); void print() override; }; @@ -80,17 +82,25 @@ class LinkEvent : public PajeEvent { public: LinkEvent(Container* container, Type* type, e_event_type event_type, Container* sourceContainer, std::string value, - std::string key); - LinkEvent(Container* container, Type* type, e_event_type event_type, Container* sourceContainer, std::string value, - std::string key, int size); + std::string key, int size) + : PajeEvent(container, type, SIMIX_get_clock(), event_type) + , endpoint_(sourceContainer) + , value_(value) + , key_(key) + , size_(size) + { + } void print() override; }; class NewEvent : public PajeEvent { - EntityValue* val; + EntityValue* value; public: - NewEvent(double timestamp, Container* container, Type* type, EntityValue* val); + NewEvent(double timestamp, Container* container, Type* type, EntityValue* value) + : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_NewEvent), value(value) + { + } void print() override; }; }