-typedef struct s_container *container_t;
-typedef struct s_container {
- sg_netcard_t netcard;
- char *name; /* Unique name of this container */
- char *id; /* Unique id of this container */
- type_t type; /* Type of this container */
- int level; /* Level in the hierarchy, root level is 0 */
- e_container_types kind; /* This container is of what kind */
- struct s_container *father;
- xbt_dict_t children;
-}s_container_t;
-
-typedef struct paje_event *paje_event_t;
-typedef struct paje_event {
- double timestamp;
- e_event_type event_type;
- void (*print) (paje_event_t event);
- void (*free) (paje_event_t event);
- void *data;
-} s_paje_event_t;
-
-typedef struct s_defineContainerType *defineContainerType_t;
-typedef struct s_defineContainerType {
- type_t type;
-}s_defineContainerType_t;
-
-typedef struct s_defineVariableType *defineVariableType_t;
-typedef struct s_defineVariableType {
- type_t type;
-}s_defineVariableType_t;
-
-typedef struct s_defineStateType *defineStateType_t;
-typedef struct s_defineStateType {
- type_t type;
-}s_defineStateType_t;
-
-typedef struct s_defineEventType *defineEventType_t;
-typedef struct s_defineEventType {
- type_t type;
-}s_defineEventType_t;
-
-typedef struct s_defineLinkType *defineLinkType_t;
-typedef struct s_defineLinkType {
- type_t type;
- type_t source;
- type_t dest;
-}s_defineLinkType_t;
-
-typedef struct s_defineEntityValue *defineEntityValue_t;
-typedef struct s_defineEntityValue {
- val_t value;
-}s_defineEntityValue_t;
-
-typedef struct s_createContainer *createContainer_t;
-typedef struct s_createContainer {
- container_t container;
-}s_createContainer_t;
-
-typedef struct s_destroyContainer *destroyContainer_t;
-typedef struct s_destroyContainer {
- container_t container;
-}s_destroyContainer_t;
-
-typedef struct s_setVariable *setVariable_t;
-typedef struct s_setVariable {
- container_t container;
- type_t type;
- double value;
-}s_setVariable_t;
-
-typedef struct s_addVariable *addVariable_t;
-typedef struct s_addVariable {
- container_t container;
- type_t type;
- double value;
-}s_addVariable_t;
-
-typedef struct s_subVariable *subVariable_t;
-typedef struct s_subVariable {
- container_t container;
- type_t type;
- double value;
-}s_subVariable_t;
-
-typedef struct s_setState *setState_t;
-typedef struct s_setState {
- container_t container;
- type_t type;
- val_t value;
- const char* filename;
- int linenumber;
-}s_setState_t;
-
-typedef struct s_pushState *pushState_t;
-typedef struct s_pushState {
- container_t container;
- type_t type;
- val_t value;
- int size;
- const char* filename;
- int linenumber;
- void* extra;
-}s_pushState_t;
-
-typedef struct s_popState *popState_t;
-typedef struct s_popState {
- container_t container;
- type_t type;
- xbt_dynar_t extra;
-}s_popState_t;
-
-typedef struct s_resetState *resetState_t;
-typedef struct s_resetState {
- container_t container;
- type_t type;
-}s_resetState_t;
-
-typedef struct s_startLink *startLink_t;
-typedef struct s_startLink {
- container_t container;
- type_t type;
- container_t sourceContainer;
- char *value;
- char *key;
- int size;
-}s_startLink_t;
-
-typedef struct s_endLink *endLink_t;
-typedef struct s_endLink {
- container_t container;
- type_t type;
- container_t destContainer;
+//--------------------------------------------------
+
+class Container {
+public:
+ Container(const char* name, simgrid::instr::e_container_types kind, Container* father);
+ virtual ~Container();
+
+ sg_netpoint_t netpoint_;
+ char* name_; /* Unique name of this container */
+ char* id_; /* Unique id of this container */
+ Type* type_; /* Type of this container */
+ int level_ = 0; /* Level in the hierarchy, root level is 0 */
+ e_container_types kind_; /* This container is of what kind */
+ Container* father_;
+ xbt_dict_t children_;
+};
+
+//--------------------------------------------------
+class PajeEvent {
+ public:
+ double timestamp_;
+ e_event_type eventType_;
+ virtual void print() = 0;
+ virtual ~PajeEvent();
+};
+
+//--------------------------------------------------
+class SetVariableEvent : public PajeEvent {
+ private:
+ Container* container;
+ Type* type;
+ double value;
+
+ public:
+ SetVariableEvent(double timestamp, Container* container, Type* type, double value);
+ void print() override;
+};
+
+class AddVariableEvent:public PajeEvent {
+ private:
+ Container* container;
+ Type* type;
+ double value;
+
+ public:
+ AddVariableEvent(double timestamp, Container* container, Type* type, double value);
+ void print() override;
+};
+//--------------------------------------------------
+
+
+class SubVariableEvent : public PajeEvent {
+ private:
+ Container* container;
+ Type* type;
+ double value;
+
+ public:
+ SubVariableEvent(double timestamp, Container* container, Type* type, double value);
+ void print() override;
+};
+//--------------------------------------------------
+
+class SetStateEvent : public PajeEvent {
+ private:
+ Container* container;
+ Type* type;
+ Value* val;
+ const char* filename;
+ int linenumber;
+
+ public:
+ SetStateEvent(double timestamp, Container* container, Type* type, Value* val);
+ void print() override;
+};
+
+
+class PushStateEvent : public PajeEvent {
+ public:
+ Container* container;
+ Type* type;
+ Value* val;
+ int size;
+ const char* filename;
+ int linenumber;
+ void* extra_;
+
+ public:
+ PushStateEvent(double timestamp, Container* container, Type* type, Value* val);
+ PushStateEvent(double timestamp, Container* container, Type* type, Value* val, void* extra);
+ void print() override;
+};
+
+class PopStateEvent : public PajeEvent {
+ Container* container;
+ Type* type;
+
+public:
+ PopStateEvent(double timestamp, Container* container, Type* type);
+ void print() override;
+};
+
+class ResetStateEvent : public PajeEvent {
+ Container* container;
+ Type* type;
+
+public:
+ ResetStateEvent(double timestamp, Container* container, Type* type);
+ void print() override;
+};
+
+class StartLinkEvent : public PajeEvent {
+ Container* container_;
+ Type* type_;
+ Container* sourceContainer_;
+ std::string value_;
+ std::string key_;
+ int size_;
+
+public:
+ StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value,
+ const char* key);
+ StartLinkEvent(double timestamp, Container* container, Type* type, Container* sourceContainer, const char* value,
+ const char* key, int size);
+ void print() override;
+};
+
+class EndLinkEvent : public PajeEvent {
+ Container* container;
+ Type* type;
+ Container* destContainer;