Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
twitching and tweaking
[simgrid.git] / src / instr / instr_paje_types.hpp
index dca29b3..c8c7a4c 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "src/instr/instr_private.hpp"
 #include <string>
+#include <vector>
 
 namespace simgrid {
 namespace instr {
@@ -18,6 +19,8 @@ class EventType;
 class LinkType;
 class StateType;
 class VariableType;
+class StateEvent;
+class VariableEvent;
 
 class Type {
   long long int id_;
@@ -53,12 +56,19 @@ public:
 
 class ContainerType : public Type {
 public:
+  explicit ContainerType(std::string name) : Type(name, name, "", nullptr){};
   ContainerType(std::string name, Type* father);
 };
 
 class VariableType : public Type {
+  std::vector<VariableEvent*> 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);
 };
 
 class ValueType : public Type {
@@ -75,6 +85,12 @@ 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);
 };
 
 class EventType : public ValueType {
@@ -83,8 +99,15 @@ public:
 };
 
 class StateType : public ValueType {
+  std::vector<StateEvent*> 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);
 };
 }
 }