X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f23b0fb864cb60978c1fcfd48d50f62dd054fe31..901293dfbce6b7e0f555dbdc53358aa347fd1a3d:/include/simgrid/simix.hpp diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index 06a9e30065..9720dc87c4 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,7 +89,7 @@ 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*, std::function code, + /* name */ std::string, simgrid::simix::ActorCode code, /* userdata */ void*, /* hostname */ sg_host_t, /* props */ std::unordered_map*, @@ -98,8 +97,8 @@ typedef smx_actor_t (*smx_creation_func_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, std::function 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);