Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove DefineVariableEvent
authorTakishipp <toufik.boubehziz@gmail.com>
Tue, 13 Jun 2017 09:54:30 +0000 (11:54 +0200)
committerTakishipp <toufik.boubehziz@gmail.com>
Tue, 13 Jun 2017 09:54:30 +0000 (11:54 +0200)
src/instr/instr_paje_trace.cpp
src/instr/instr_paje_types.cpp
src/instr/instr_private.h

index b520463..cab9eef 100644 (file)
@@ -236,24 +236,18 @@ void DefineContainerEvent(type_t type)
 
 
 
-DefineVariableTypeEvent::DefineVariableTypeEvent(type_t type)
+void DefineVariableTypeEvent(type_t type)
 {
-  this->event_type                           = PAJE_DefineVariableType;
-  this->timestamp                            = 0;
-  this->type = type;
+  e_event_type event_type                           = PAJE_DefineVariableType;
+  double timestamp                            = 0;
 
   XBT_DEBUG("%s: event_type=%d", __FUNCTION__, (int)event_type);
 
   //print it
-  print ();
-       delete this;
-}
-
-void DefineVariableTypeEvent::print() {
-  if (instr_fmt_type == instr_fmt_paje) {
+if (instr_fmt_type == instr_fmt_paje) {
     XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event_type, TRACE_precision(), timestamp);
     stream << std::fixed << std::setprecision(TRACE_precision());
-    stream << (int)this->event_type;
+    stream << (int)event_type;
     stream << " " << type->id << " " << type->father->id << " " << type->name;
     if (type->color)
       stream << " \"" << type->color << "\"";
@@ -265,6 +259,7 @@ void DefineVariableTypeEvent::print() {
   }
 }
 
+
 DefineStateTypeEvent::DefineStateTypeEvent(type_t type)
 {
   this->event_type                        = PAJE_DefineStateType;
index c4fb6cf..af48148 100644 (file)
@@ -162,7 +162,7 @@ type_t PJ_type_variable_new (const char *name, const char *color, type_t father)
     ret = newType (name, name, color, TYPE_VARIABLE, father);
   }
   XBT_DEBUG("VariableType %s(%s), child of %s(%s)", ret->name, ret->id, father->name, father->id);
-  new DefineVariableTypeEvent (ret);
+  DefineVariableTypeEvent (ret);
   return ret;
 }
 
index f2a3594..ac6366a 100644 (file)
@@ -125,13 +125,6 @@ class PajeEvent {
 
 //--------------------------------------------------
 
-class DefineVariableTypeEvent : public PajeEvent 
-{
-  public:
-  type_t type;
-   DefineVariableTypeEvent(type_t type);
-   void print() override;
-};
 //--------------------------------------------------
 
 class DefineStateTypeEvent : public PajeEvent  {
@@ -467,5 +460,6 @@ extern instr_fmt_type_t instr_fmt_type;
 SG_END_DECL()
 
 void DefineContainerEvent(type_t type);
+void DefineVariableTypeEvent(type_t type);
 
 #endif