Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add link_new to s_type class as a method
authorTakishipp <toufik.boubehziz@gmail.com>
Wed, 16 Aug 2017 14:44:48 +0000 (16:44 +0200)
committerTakishipp <toufik.boubehziz@gmail.com>
Wed, 16 Aug 2017 14:44:48 +0000 (16:44 +0200)
src/instr/instr_paje_types.cpp
src/instr/instr_private.h
src/surf/instr_routing.cpp

index bb0715f..fa6d776 100644 (file)
@@ -151,7 +151,7 @@ type_t s_type::s_type_variable_new (const char *name, const char *color, type_t
   return ret;
 }
 
-type_t PJ_type_link_new (const char *name, type_t father, type_t source, type_t dest)
+type_t s_type::s_type_link_new (const char *name, type_t father, type_t source, type_t dest)
 {
   if (name == nullptr){
     THROWF (tracing_error, 0, "can't create a link type with a nullptr name");
index 6b4a1a6..26bdc55 100644 (file)
@@ -78,6 +78,7 @@ class s_type : public ess_type {
   static type_t s_type_container_new (const char *name, type_t father);
   static type_t s_type_event_new (const char *name, type_t father);
   static type_t s_type_variable_new (const char *name, const char *color, type_t father);
+  static type_t s_type_link_new (const char *name, type_t father, type_t source, type_t dest);
 };
 
 //--------------------------------------------------
@@ -347,7 +348,6 @@ XBT_PUBLIC(void) PJ_container_remove_from_parent (container_t container);
 /* instr_paje_types.c */
 XBT_PRIVATE void PJ_type_release ();
 XBT_PUBLIC(type_t)  PJ_type_get_root ();
-type_t PJ_type_link_new (const char *name, type_t father, type_t source, type_t dest);
 XBT_PRIVATE type_t PJ_type_state_new (const char *name, type_t father);
 XBT_PUBLIC(type_t)  PJ_type_get (const char *name, const type_t father);
 XBT_PRIVATE XBT_PRIVATE void PJ_type_free (type_t type); 
index 669aa16..fefb29c 100644 (file)
@@ -107,7 +107,7 @@ static void linkContainers (container_t src, container_t dst, xbt_dict_t filter)
             dst->type->name, dst->type->id);
   type_t link_type = s_type::s_type_get_or_null (link_typename, father->type);
   if (link_type == nullptr){
-    link_type = PJ_type_link_new (link_typename, father->type, src->type, dst->type);
+    link_type = s_type::s_type_link_new (link_typename, father->type, src->type, dst->type);
   }
 
   //register EDGE types for triva configuration
@@ -178,7 +178,7 @@ static void sg_instr_AS_begin(simgrid::s4u::NetZone& netzone)
         mpi = s_type::s_type_container_new("MPI", root->type);
         if (not TRACE_smpi_is_grouped())
           PJ_type_state_new ("MPI_STATE", mpi);
-        PJ_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
+        s_type::s_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
       }
     }
 
@@ -272,8 +272,8 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
       value::get_or_new("receive", "1 0 0", state);
       value::get_or_new("send", "0 0 1", state);
       value::get_or_new("task_execute", "0 1 1", state);
-      PJ_type_link_new ("MSG_PROCESS_LINK", PJ_type_get_root(), msg_process, msg_process);
-      PJ_type_link_new ("MSG_PROCESS_TASK_LINK", PJ_type_get_root(), msg_process, msg_process);
+      s_type::s_type_link_new ("MSG_PROCESS_LINK", PJ_type_get_root(), msg_process, msg_process);
+      s_type::s_type_link_new ("MSG_PROCESS_TASK_LINK", PJ_type_get_root(), msg_process, msg_process);
     }
   }
 
@@ -287,8 +287,8 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
       value::get_or_new("receive", "1 0 0", state);
       value::get_or_new("send", "0 0 1", state);
       value::get_or_new("task_execute", "0 1 1", state);
-      PJ_type_link_new ("MSG_VM_LINK", PJ_type_get_root(), msg_vm, msg_vm);
-      PJ_type_link_new ("MSG_VM_PROCESS_LINK", PJ_type_get_root(), msg_vm, msg_vm);
+      s_type::s_type_link_new ("MSG_VM_LINK", PJ_type_get_root(), msg_vm, msg_vm);
+      s_type::s_type_link_new ("MSG_VM_PROCESS_LINK", PJ_type_get_root(), msg_vm, msg_vm);
     }
   }