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,
38 Container* container_;
42 Type* getType() { return type_; }
43 Container* getContainer() { return container_; }
46 e_event_type eventType_;
47 PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType)
48 : container_(container), type_(type), timestamp_(timestamp), eventType_(eventType){};
49 virtual ~PajeEvent() = default;
50 virtual void print() = 0;
51 void insertIntoBuffer();
54 class VariableEvent : public PajeEvent {
58 VariableEvent(double timestamp, Container* container, Type* type, e_event_type event_type, double value);
59 void print() override;
62 class StateEvent : public PajeEvent {
66 void* extra_ = nullptr;
69 StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value);
70 StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, void* extra);
71 void print() override;
74 class LinkEvent : public PajeEvent {
81 LinkEvent(Container* container, Type* type, e_event_type event_type, Container* sourceContainer, std::string value,
83 LinkEvent(Container* container, Type* type, e_event_type event_type, Container* sourceContainer, std::string value,
84 std::string key, int size);
85 void print() override;
88 class NewEvent : public PajeEvent {
92 NewEvent(double timestamp, Container* container, Type* type, EntityValue* val);
93 void print() override;