X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7dc88f3f2d9046ce7244200bf1c1d3442a94e890..6126924e83eded994bef252b90becedc31015a59:/include/simgrid/simix.hpp diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index f2273046a0..341f54fbca 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -70,11 +70,10 @@ XBT_PUBLIC const std::vector& process_get_runnable(); // What's executed as SIMIX actor code: typedef std::function ActorCode; -// Create ActorCode based on argv: +// Create an ActorCode based on a std::string typedef std::function args)> ActorCodeFactory; -XBT_PUBLIC void register_function(const char* name, ActorCodeFactory factory); - +XBT_PUBLIC void register_function(std::string name, ActorCodeFactory factory); } } @@ -90,16 +89,14 @@ XBT_PUBLIC void register_function(const char* name, ActorCodeFactory factory); * std::map* props: properties */ typedef smx_actor_t (*smx_creation_func_t)( - /* name */ const char*, simgrid::simix::ActorCode code, + /* name */ std::string, simgrid::simix::ActorCode code, /* userdata */ void*, /* hostname */ sg_host_t, /* props */ std::unordered_map*, /* parent_process */ smx_actor_t); -XBT_PUBLIC void SIMIX_function_register_process_create(smx_creation_func_t function); - -XBT_PUBLIC smx_actor_t simcall_process_create(const char* name, simgrid::simix::ActorCode code, void* data, sg_host_t host, - std::unordered_map* properties); +XBT_PUBLIC smx_actor_t simcall_process_create(std::string name, simgrid::simix::ActorCode code, void* data, + sg_host_t host, std::unordered_map* properties); XBT_PUBLIC smx_timer_t SIMIX_timer_set(double date, simgrid::xbt::Task callback);