WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
MessageManager.h
1 
10 #ifdef MESSAGE_MANAGER
11 
12 #ifndef WRENCH_MESSAGEMANAGER_H
13 #define WRENCH_MESSAGEMANAGER_H
14 
15 #include <unordered_set>
16 
17 #include <wrench/services/Service.h>
18 #include <wrench/simulation/SimulationMessage.h>
19 
20 namespace wrench {
21 
22 
23  /***********************/
25  /***********************/
26 
32  class MessageManager {
33 
34  static std::unordered_map<std::string,std::unordered_set<SimulationMessage*>> mailbox_messages;
35 
36  public:
37 
38  static void manageMessage(const std::string &mailbox, SimulationMessage* msg);
39  static void cleanUpMessages(const std::string &mailbox);
40  static void removeReceivedMessage(const std::string &mailbox, SimulationMessage *msg);
41  static void cleanUpAllMessages();
42  static void print();
43 
44  };
45 
46  /***********************/
48  /***********************/
49 }
50 
51 
52 #endif //WRENCH_MESSAGEMANAGER_H
53 
54 #endif //MESSAGE_MANAGER
wrench
Definition: Alarm.cpp:20