1 /* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef INSTR_PAJE_EVENTS_HPP
7 #define INSTR_PAJE_EVENTS_HPP
9 #include "src/instr/instr_private.hpp"
16 enum e_event_type : unsigned int {
17 PAJE_DefineContainerType,
18 PAJE_DefineVariableType,
22 PAJE_DefineEntityValue,
24 PAJE_DestroyContainer,
44 e_event_type eventType_;
45 PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType)
46 : container(container), type(type), timestamp_(timestamp), eventType_(eventType){};
47 virtual ~PajeEvent() = default;
48 virtual void print() = 0;
49 void insertIntoBuffer();
52 class VariableEvent : public PajeEvent {
56 VariableEvent(double timestamp, Container* container, Type* type, e_event_type event_type, double value);
57 void print() override;
60 class StateEvent : public PajeEvent {
64 void* extra_ = nullptr;
67 StateEvent(double timestamp, Container* container, Type* type, e_event_type event_type, EntityValue* value);
68 StateEvent(double timestamp, Container* container, Type* type, e_event_type event_type, EntityValue* value,
70 void print() override;
73 class LinkEvent : public PajeEvent {
80 LinkEvent(double timestamp, Container* container, Type* type, e_event_type event_type, Container* sourceContainer,
81 std::string value, std::string key);
82 LinkEvent(double timestamp, Container* container, Type* type, e_event_type event_type, Container* sourceContainer,
83 std::string value, std::string key, int size);
84 void print() override;
87 class NewEvent : public PajeEvent {
91 NewEvent(double timestamp, Container* container, Type* type, EntityValue* val);
92 void print() override;