X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/09a679c1f6bbe99bfd05becefc1d2e2fc008a302..25f81e17d9f23d3eaf9b6907eed3cab3b8cf3e6b:/src/instr/instr_paje_types.hpp diff --git a/src/instr/instr_paje_types.hpp b/src/instr/instr_paje_types.hpp index 6d9a9bffcb..696bfdaca7 100644 --- a/src/instr/instr_paje_types.hpp +++ b/src/instr/instr_paje_types.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -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,30 +23,27 @@ class Type { public: std::map children_; + Container* issuer_ = nullptr; Type(std::string name, std::string alias, std::string color, Type* father); virtual ~Type(); - std::string getName() { return name_; } - const char* getCname() { return name_.c_str(); } - long long int getId() { return id_; } + std::string get_name() { return name_; } + const char* get_cname() { return name_.c_str(); } + long long int get_id() { return id_; } 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); - StateType* getState(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 { @@ -64,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 { @@ -87,10 +76,9 @@ public: class LinkType : public ValueType { public: LinkType(std::string name, std::string alias, Type* father); - 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); + 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,15 +88,12 @@ public: class StateType : public ValueType { std::vector events_; - Container* issuer_ = nullptr; - public: StateType(std::string name, Type* father); ~StateType(); - 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 pushEvent(std::string value_name, TIData* extra); void popEvent(); }; }