S4U_DaemonActor.h
1 
12 #ifndef WRENCH_SIM4U_DAEMONACTOR_H
13 #define WRENCH_SIM4U_DAEMONACTOR_H
14 
15 
16 #include <xbt.h>
17 #include <string>
18 #include <vector>
19 #include <iostream>
20 #include <wrench-dev.h>
21 #include "wrench/simgrid_S4U_util/S4U_Mailbox.h"
22 
23 
24 /***********************/
26 /***********************/
27 
28 namespace wrench {
29 
30  class S4U_Daemon;
31 
36 
37  public:
38 
43  explicit S4U_DaemonActor(S4U_Daemon *d) {
44  this->daemon = d;
45  }
46 
50  void operator()() {
51  this->daemon->runMainMethod();
52  }
53 
54  private:
55  S4U_Daemon *daemon;
56 
57  };
58 
59  /***********************/
61  /***********************/
62 };
63 
64 
65 #endif //WRENCH_SIM4U_DAEMONWITHMAILBOXACTOR_H
S4U_DaemonActor(S4U_Daemon *d)
Constructor.
Definition: S4U_DaemonActor.h:43
void runMainMethod()
Method that run&#39;s the user-defined main method (that&#39;s called by the S4U actor class) ...
Definition: S4U_Daemon.cpp:211
The S4U actor that&#39;s the foundation for the S4U_Daemon abstraction.
Definition: S4U_DaemonActor.h:35
void operator()()
The S4U way of defining the actor&#39;s "main" method.
Definition: S4U_DaemonActor.h:50
A generic "running daemon" abstraction that serves as a basis for all simulated processes.
Definition: S4U_Daemon.h:32
Definition: TerminalOutput.cpp:15