*/
public:
StopRequest() = default;
- explicit StopRequest(std::string msg) : msg_(std::string("Actor killed (") + msg + std::string(").")) {}
+ explicit StopRequest(const std::string& msg) : msg_(std::string("Actor killed (") + msg + std::string(").")) {}
~StopRequest();
const char* what() const noexcept { return msg_.c_str(); }
+ static void do_throw();
+ static bool try_n_catch(std::function<void(void)> try_block);
+
private:
std::string msg_ = std::string("Actor killed.");
};
-XBT_PUBLIC void throw_stoprequest();
-XBT_PUBLIC bool try_n_catch_stoprequest(std::function<void(void)> try_block);
/* This allows Java to hijack the context factory (Java induces factories of factory :) */
typedef ContextFactory* (*ContextFactoryInitializer)();
XBT_PRIVATE void SIMIX_post_create_environment();
-XBT_PRIVATE simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory(std::string name);
+XBT_PRIVATE simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory(const std::string& name);
#endif