From 661ccd573b479184dadaf0ca6d2677d5483a7bf0 Mon Sep 17 00:00:00 2001 From: Takishipp Date: Wed, 16 Aug 2017 16:44:48 +0200 Subject: [PATCH] Add link_new to s_type class as a method --- src/instr/instr_paje_types.cpp | 2 +- src/instr/instr_private.h | 2 +- src/surf/instr_routing.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/instr/instr_paje_types.cpp b/src/instr/instr_paje_types.cpp index bb0715fd8b..fa6d776b2c 100644 --- a/src/instr/instr_paje_types.cpp +++ b/src/instr/instr_paje_types.cpp @@ -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"); diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 6b4a1a6645..26bdc555ae 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -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); diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index 669aa16700..fefb29cf39 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -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); } } -- 2.20.1