X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43bcc7a70e8f2f69fb3563226b55be8483e793f6..6f536df44e36ac12984106ae7c0e2784e45b30d6:/src/instr/instr_paje_types.hpp diff --git a/src/instr/instr_paje_types.hpp b/src/instr/instr_paje_types.hpp index c8c7a4c518..b07bc6575a 100644 --- a/src/instr/instr_paje_types.hpp +++ b/src/instr/instr_paje_types.hpp @@ -12,15 +12,8 @@ namespace simgrid { namespace instr { -enum e_event_type : unsigned int; -class EntityValue; class ContainerType; class EventType; -class LinkType; -class StateType; -class VariableType; -class StateEvent; -class VariableEvent; class Type { long long int id_; @@ -30,6 +23,7 @@ class Type { public: std::map children_; + Container* issuer_ = nullptr; Type(std::string name, std::string alias, std::string color, Type* father); virtual ~Type(); @@ -40,18 +34,16 @@ 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); StateType* getOrCreateStateType(std::string name); VariableType* getOrCreateVariableType(std::string name, std::string color); + void setCallingContainer(Container* container) { issuer_ = container; } + void logDefinition(e_event_type event_type); void logDefinition(Type* source, Type* dest); - - static ContainerType* createRootType(); - static ContainerType* getRootType(); }; class ContainerType : public Type { @@ -62,13 +54,12 @@ public: class VariableType : public Type { std::vector events_; - 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 setEvent(double timestamp, double value); + void addEvent(double timestamp, double value); + void subEvent(double timestamp, double value); }; class ValueType : public Type { @@ -85,12 +76,9 @@ 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* startContainer, std::string value, std::string key); + void startEvent(Container* startContainer, std::string value, std::string key, int size); + void endEvent(Container* endContainer, std::string value, std::string key); }; class EventType : public ValueType { @@ -100,14 +88,13 @@ public: class StateType : public ValueType { std::vector events_; - 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 setEvent(std::string value_name); + void pushEvent(std::string value_name); + void pushEvent(std::string value_name, TIData* extra); + void popEvent(); }; } }