- return [code](std::vector<std::string> args) { return std::bind(std::move(code), std::move(args)); };
-}
-
-/**
- * @brief Registers a #xbt_main_func_t code in a global table.
- *
- * Registers a code function in a global table.
- * This table is then used by #SIMIX_launch_application.
- * @param name the reference name of the function.
- * @param code the function
- */
-void SIMIX_function_register(const std::string& name, xbt_main_func_t code)
-{
- simix_global->registered_functions[name] = toActorCodeFactory(code);
-}
-void SIMIX_function_register(const std::string& name, void (*code)(std::vector<std::string>))
-{
- simix_global->registered_functions[name] = toActorCodeFactory(code);
-}
-
-void SIMIX_function_register(const char* name, xbt_main_func_t code) // deprecated
-{
- simgrid_register_function(name, code);
-}
-
-/**
- * @brief Registers a #xbt_main_func_t code as default value.
- *
- * Registers a code function as being the default value. This function will get used by SIMIX_launch_application() when
- * there is no registered function of the requested name in.
- * @param code the function
- */
-void SIMIX_function_register_default(xbt_main_func_t code)
-{
- xbt_assert(simix_global, "SIMIX_global_init has to be called before SIMIX_function_register.");
- simix_global->default_function = toActorCodeFactory(code);
-}
-
-/**
- * @brief Gets a #smx_actor_t code from the global table.
- *
- * Gets a code function from the global table. Returns nullptr if there are no function registered with the name.
- * This table is then used by #SIMIX_launch_application.
- * @param name the reference name of the function.
- * @return The #smx_actor_t or nullptr.
- */
-simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory(const std::string& name)
-{
- xbt_assert(simix_global,
- "SIMIX_global_init has to be called before SIMIX_get_actor_code_factory.");
-
- auto i = simix_global->registered_functions.find(name);
- if (i == simix_global->registered_functions.end())
- return simix_global->default_function;
- else
- return i->second;