-
-// Wrap a main() function into a ActorCodeFactory:
-static simgrid::simix::ActorCodeFactory toActorCodeFactory(xbt_main_func_t code)
-{
- return [code](std::vector<std::string> args) { return simgrid::xbt::wrap_main(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(std::string name, xbt_main_func_t code)
-{
- xbt_assert(simix_global,
- "SIMIX_global_init has to be called before SIMIX_function_register.");
- simix_global->registered_functions[name] = toActorCodeFactory(code);
-}
-
-void SIMIX_function_register(const char* name, xbt_main_func_t code)