//--------------------------------------------------
class Value {
-public:
- char* id_;
- char* name_;
- char* color_;
+private:
+ std::string name_;
+ std::string id_;
+ std::string color_;
+ explicit Value(std::string name, std::string color, Type* father);
+
+public:
+ ~Value() = default;
Type* father_;
- Value(const char* name, const char* color, Type* father);
- ~Value();
- static Value* get_or_new(const char* name, const char* color, Type* father);
- static Value* get(const char* name, Type* father);
+ static Value* byNameOrCreate(std::string name, std::string color, Type* father);
+ static Value* byName(std::string name, Type* father);
+ const char* getCname() { return name_.c_str(); }
+ const char* getId() { return id_.c_str(); }
+ bool isColored() { return not color_.empty(); }
+ void print();
};
//--------------------------------------------------
//--------------------------------------------------
class PajeEvent {
+protected:
+ Container* container;
+ Type* type;
+
public:
double timestamp_;
e_event_type eventType_;
+ PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType)
+ : container(container), type(type), timestamp_(timestamp), eventType_(eventType){};
virtual void print() = 0;
virtual ~PajeEvent();
};
//--------------------------------------------------
class SetVariableEvent : public PajeEvent {
-private:
- Container* container;
- Type* type;
double value;
public:
};
class AddVariableEvent : public PajeEvent {
-private:
- Container* container;
- Type* type;
double value;
public:
//--------------------------------------------------
class SubVariableEvent : public PajeEvent {
-private:
- Container* container;
- Type* type;
double value;
public:
//--------------------------------------------------
class SetStateEvent : public PajeEvent {
-private:
- Container* container;
- Type* type;
Value* value;
const char* filename;
int linenumber;
};
class PushStateEvent : public PajeEvent {
-public:
- Container* container;
- Type* type;
Value* value;
int size;
const char* filename;
};
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_;
};
class EndLinkEvent : public PajeEvent {
- Container* container;
- Type* type;
Container* destContainer;
std::string value;
std::string key;
};
class NewEvent : public PajeEvent {
-public:
- Container* container;
- Type* type;
Value* val;
public:
void LogVariableTypeDefinition(simgrid::instr::Type* type);
void LogStateTypeDefinition(simgrid::instr::Type* type);
void LogLinkTypeDefinition(simgrid::instr::Type* type, simgrid::instr::Type* source, simgrid::instr::Type* dest);
-void LogEntityValue(simgrid::instr::Value* val);
void LogContainerCreation(container_t container);
void LogContainerDestruction(container_t container);
void LogDefineEventType(simgrid::instr::Type* type);