X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8976bfbf1b73e13049d914169c672eabf7b63164..9383e83f66e7cb0180d6acfc435d2622615c2c7f:/src/instr/instr_paje_types.hpp diff --git a/src/instr/instr_paje_types.hpp b/src/instr/instr_paje_types.hpp index 5a18cc096a..8ce51ade3b 100644 --- a/src/instr/instr_paje_types.hpp +++ b/src/instr/instr_paje_types.hpp @@ -40,7 +40,6 @@ public: bool isColored() { return not color_.empty(); } Type* byName(std::string name); - ContainerType* getOrCreateContainerType(std::string name); EventType* getOrCreateEventType(std::string name); LinkType* getOrCreateLinkType(std::string name, Type* source, Type* dest); @@ -49,26 +48,25 @@ public: void logDefinition(e_event_type event_type); void logDefinition(Type* source, Type* dest); - - static ContainerType* createRootType(); - static ContainerType* getRootType(); }; class ContainerType : public Type { public: - ContainerType(std::string name) : Type(name, name, "", nullptr){}; + explicit ContainerType(std::string name) : Type(name, name, "", nullptr){}; ContainerType(std::string name, Type* father); }; class VariableType : public Type { std::vector events_; + Container* issuer_ = nullptr; public: VariableType(std::string name, std::string color, Type* father); ~VariableType(); - void setEvent(double timestamp, Container* container, double value); - void addEvent(double timestamp, Container* container, double value); - void subEvent(double timestamp, Container* container, double value); + void setCallingContainer(Container* container) { issuer_ = container; } + void setEvent(double timestamp, double value); + void addEvent(double timestamp, double value); + void subEvent(double timestamp, double value); }; class ValueType : public Type { @@ -85,12 +83,10 @@ public: class LinkType : public ValueType { public: LinkType(std::string name, std::string alias, Type* father); - void startEvent(double timestamp, Container* source_container, Container* sourceContainer, std::string value, - std::string key); - void startEvent(double timestamp, Container* source_container, Container* sourceContainer, std::string value, - std::string key, int size); - void endEvent(double timestamp, Container* source_container, Container* destContainer, std::string value, - std::string key); + void startEvent(Container* source_container, Container* sourceContainer, std::string value, std::string key); + void startEvent(Container* source_container, Container* sourceContainer, std::string value, std::string key, + int size); + void endEvent(Container* source_container, Container* destContainer, std::string value, std::string key); }; class EventType : public ValueType { @@ -100,14 +96,16 @@ public: class StateType : public ValueType { std::vector events_; + Container* issuer_ = nullptr; public: StateType(std::string name, Type* father); ~StateType(); - void setEvent(double timestamp, Container* container, std::string value_name); - void pushEvent(double timestamp, Container* container, std::string value_name); - void pushEvent(double timestamp, Container* container, std::string value_name, void* extra); - void popEvent(double timestamp, Container* container); + void setCallingContainer(Container* container) { issuer_ = container; } + void setEvent(std::string value_name); + void pushEvent(std::string value_name); + void pushEvent(std::string value_name, void* extra); + void popEvent(); }; } }