WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
S4U_DaemonActor.h
1 
12 #ifndef WRENCH_SIM4U_DAEMONACTOR_H
13 #define WRENCH_SIM4U_DAEMONACTOR_H
14 
15 
16 #include "wrench/logging/TerminalOutput.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 
25 /***********************/
27 /***********************/
28 
29 namespace wrench {
30 
31  class S4U_Daemon;
32 
37 
38  public:
39 
44  explicit S4U_DaemonActor(S4U_Daemon *d) {
45  this->daemon = d;
46  }
47 
51  void operator()() {
52  this->daemon->runMainMethod();
53  }
54 
55  private:
56 
57  S4U_Daemon *daemon;
58 
59  };
60 
61  /***********************/
63  /***********************/
64 };
65 
66 
67 #endif //WRENCH_SIM4U_DAEMONWITHMAILBOXACTOR_H
wrench
Definition: Alarm.cpp:20
wrench::S4U_DaemonActor::S4U_DaemonActor
S4U_DaemonActor(S4U_Daemon *d)
Constructor.
Definition: S4U_DaemonActor.h:44
wrench::S4U_Daemon
A generic "running daemon" abstraction that serves as a basis for all simulated processes.
Definition: S4U_Daemon.h:32
wrench::S4U_DaemonActor::operator()
void operator()()
The S4U way of defining the actor's "main" method.
Definition: S4U_DaemonActor.h:51
wrench::S4U_DaemonActor
The S4U actor that's the foundation for the S4U_Daemon abstraction.
Definition: S4U_DaemonActor.h:36
wrench::S4U_Daemon::runMainMethod
void runMainMethod()
Method that run's the user-defined main method (that's called by the S4U actor class)
Definition: S4U_Daemon.cpp:247