Logo AND Algorithmique Numérique Distribuée

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

index fa6d776..f9d8318 100644 (file)
@@ -168,7 +168,7 @@ type_t s_type::s_type_link_new (const char *name, type_t father, type_t source,
   return ret;
 }
 
-type_t PJ_type_state_new (const char *name, type_t father)
+type_t s_type::s_type_state_new (const char *name, type_t father)
 {
   if (name == nullptr){
     THROWF (tracing_error, 0, "can't create a state type with a nullptr name");
index 26bdc55..799692c 100644 (file)
@@ -79,6 +79,7 @@ class s_type : public ess_type {
   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);
+  static type_t s_type_state_new (const char *name, type_t father);
 };
 
 //--------------------------------------------------
@@ -348,7 +349,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 ();
-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 fefb29c..32d0f0a 100644 (file)
@@ -177,7 +177,7 @@ static void sg_instr_AS_begin(simgrid::s4u::NetZone& netzone)
       if (mpi == nullptr){
         mpi = s_type::s_type_container_new("MPI", root->type);
         if (not TRACE_smpi_is_grouped())
-          PJ_type_state_new ("MPI_STATE", mpi);
+          s_type::s_type_state_new ("MPI_STATE", mpi);
         s_type::s_type_link_new ("MPI_LINK", PJ_type_get_root(), mpi, mpi);
       }
     }
@@ -258,7 +258,7 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
     type_t mpi = s_type::s_type_get_or_null ("MPI", container->type);
     if (mpi == nullptr){
       mpi = s_type::s_type_container_new("MPI", container->type);
-      PJ_type_state_new ("MPI_STATE", mpi);
+      s_type::s_type_state_new ("MPI_STATE", mpi);
     }
   }
 
@@ -266,7 +266,7 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
     type_t msg_process = s_type::s_type_get_or_null ("MSG_PROCESS", container->type);
     if (msg_process == nullptr){
       msg_process = s_type::s_type_container_new("MSG_PROCESS", container->type);
-      type_t state = PJ_type_state_new ("MSG_PROCESS_STATE", msg_process);
+      type_t state = s_type::s_type_state_new ("MSG_PROCESS_STATE", msg_process);
       value PJ_value("suspend", "1 0 1", state);
       value::get_or_new("sleep", "1 1 0", state);
       value::get_or_new("receive", "1 0 0", state);
@@ -281,7 +281,7 @@ static void sg_instr_new_host(simgrid::s4u::Host& host)
     type_t msg_vm = s_type::s_type_get_or_null ("MSG_VM", container->type);
     if (msg_vm == nullptr){
       msg_vm = s_type::s_type_container_new("MSG_VM", container->type);
-      type_t state = PJ_type_state_new ("MSG_VM_STATE", msg_vm);
+      type_t state = s_type::s_type_state_new ("MSG_VM_STATE", msg_vm);
       value PJ_value("suspend", "1 0 1", state);
       value::get_or_new("sleep", "1 1 0", state);
       value::get_or_new("receive", "1 0 0", state);
@@ -385,7 +385,7 @@ void instr_new_user_variable_type  (const char *father_type, const char *new_typ
 static void recursiveNewUserStateType (const char *father_type, const char *new_typename, type_t root)
 {
   if (not strcmp(root->name, father_type)) {
-    PJ_type_state_new (new_typename, root);
+    s_type::s_type_state_new (new_typename, root);
   }
   xbt_dict_cursor_t cursor = nullptr;
   type_t child_type;