/** Create an actor using a function
*
* If the actor is restarted, the actor has a fresh copy of the function.
*/
/** Create an actor using a function
*
* If the actor is restarted, the actor has a fresh copy of the function.
*/
- static Ptr createActor(const char* name, s4u::Host *host, double killTime, std::function<void()> code);
+ static ActorPtr createActor(const char* name, s4u::Host *host, double killTime, std::function<void()> code);
{
return createActor(name, host, -1.0, std::move(code));
}
{
return createActor(name, host, -1.0, std::move(code));
}
// This constructor is enabled only if the call code(args...) is valid:
typename = typename std::result_of<F(Args...)>::type
>
// This constructor is enabled only if the call code(args...) is valid:
typename = typename std::result_of<F(Args...)>::type
>
- static Ptr createActor(const char* name, s4u::Host *host, F code, Args... args)
+ static ActorPtr createActor(const char* name, s4u::Host *host, F code, Args... args)
{
return createActor(name, host, wrap_task(std::move(code), std::move(args)...));
}
// Create actor from function name:
{
return createActor(name, host, wrap_task(std::move(code), std::move(args)...));
}
// Create actor from function name:
- static Ptr createActor(const char* name, s4u::Host *host, double killTime,
+ static ActorPtr createActor(const char* name, s4u::Host *host, double killTime,
- static Ptr createActor(const char* name, s4u::Host *host, const char* function,
+ static ActorPtr createActor(const char* name, s4u::Host *host, const char* function,
std::vector<std::string> args)
{
return createActor(name, host, -1.0, function, std::move(args));
std::vector<std::string> args)
{
return createActor(name, host, -1.0, function, std::move(args));
/** If set to true, the actor will automatically restart when its host reboots */
void setAutoRestart(bool autorestart);
/** If set to true, the actor will automatically restart when its host reboots */
void setAutoRestart(bool autorestart);
/** Block the actor until it delivers a message of the given simulated size to the given mailbox
*
* See \ref Comm for the full communication API (including non blocking communications).
*/
/** Block the actor until it delivers a message of the given simulated size to the given mailbox
*
* See \ref Comm for the full communication API (including non blocking communications).
*/