COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Notifier.hpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #ifndef cf3_Tools_solver_Notifier_hpp
8 #define cf3_Tools_solver_Notifier_hpp
9 
11 
12 #include <boost/signals2.hpp>
13 
14 #include "common/Handle.hpp"
16 
18 
19 namespace cf3 {
20 
21 namespace common { namespace PE { class Manager; } }
22 
23 namespace Tools {
24 namespace solver {
25 
27 
28  class Notifier
29  {
30  public:
31 
33 
34  ~Notifier();
35 
36  void listen_to_event(const std::string & name, bool notify_once);
37 
38  void begin_notify();
39 
40  void new_event(const std::string & name, common::SignalArgs &args);
41 
42  boost::signals2::signal< void (const std::string &, common::SignalArgs &) > event_occured;
43 
44 // signals:
45 
46 // void eventOccured(const std::string & name, const cf3::common::URI & raiserPath);
47 
48  private:
49 
51 
52  std::map<std::string, bool> m_once_notifying_events;
53 
55 
56  }; // class Notifier
57 
59 
60 } // solver
61 } // Tools
62 } // cf3
63 
65 
66 #endif // cf3_Tools_solver_Notifier_hpp
std::string name(ComponentWrapper &self)
common::NotificationQueue * m_observed_queue
Definition: Notifier.hpp:50
Manages a set of maps.
Definition: SignalFrame.hpp:31
Handle< common::PE::Manager > m_manager
Definition: Notifier.hpp:54
boost::signals2::signal< void(const std::string &, common::SignalArgs &) > event_occured
Definition: Notifier.hpp:42
Manages a notification queue.
Top-level namespace for coolfluid.
Definition: Action.cpp:18
void new_event(const std::string &name, common::SignalArgs &args)
Definition: Notifier.cpp:58
void listen_to_event(const std::string &name, bool notify_once)
Definition: Notifier.cpp:38
Notifier(const Handle< common::PE::Manager > &manager)
Definition: Notifier.cpp:21
std::map< std::string, bool > m_once_notifying_events
Definition: Notifier.hpp:52
Send comments to:
COOLFluiD Web Admin