rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
actionCallback.hpp
Go to the documentation of this file.
1 
9 #ifndef RAD_ACTION_CALLBACK_HPP
10 #define RAD_ACTION_CALLBACK_HPP
11 
12 #include <rad/anyEvent.hpp>
13 
14 #include <scxml4cpp/Action.h>
15 #include <scxml4cpp/Context.h>
16 
17 #include <functional>
18 
19 namespace rad {
20 
25  public:
26  ActionCallback(const std::string id, std::function<void(AnyEvent const&)> action_method);
27 
28  void execute(scxml4cpp::Context* c);
30 
31  ActionCallback(const ActionCallback&) = delete;
32  ActionCallback& operator=(const ActionCallback&) = delete;
33 
34  private:
35  std::function<void(AnyEvent const&)> m_action_method;
36 };
37 
38 } // namespace rad
39 
40 #endif // RAD_ACTION_CALLBACK_HPP
ActionCallback(const std::string id, std::function< void(AnyEvent const &)> action_method)
Definition: actionCallback.cpp:20
Definition: Action.h:40
Definition: Context.h:43
ActionCallback & operator=(const ActionCallback &)=delete
Disable copy constructor.
Definition: anyEvent.hpp:52
Definition: actionCallback.hpp:24
void execute(scxml4cpp::Context *c)
Definition: actionCallback.cpp:33
bool evaluate(scxml4cpp::Context *c)
Definition: actionCallback.cpp:57