rad  5.1.0
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 #include <rad/exceptions.hpp>
14 #include <rad/smEvent.hpp>
15 
16 #include <scxml4cpp/Action.h>
17 #include <scxml4cpp/Context.h>
18 
19 #include <functional>
20 
21 namespace rad {
22 
27  public:
28  ActionCallback(const std::string& id, std::function<void(scxml4cpp::Context* c)> action_method);
29 
30  void execute(scxml4cpp::Context* c);
32 
33  ActionCallback(const ActionCallback&) = delete;
35 
36  private:
37  std::function<void(scxml4cpp::Context* c)> m_action_method;
38 };
39 
40 } // namespace rad
41 
42 #endif // RAD_ACTION_CALLBACK_HPP
Action header.
Context header.
AnyEvent class header file.
Definition: actionCallback.hpp:26
ActionCallback & operator=(const ActionCallback &)=delete
Disable copy constructor.
bool evaluate(scxml4cpp::Context *c)
Definition: actionCallback.cpp:57
ActionCallback(const ActionCallback &)=delete
ActionCallback(const std::string &id, std::function< void(scxml4cpp::Context *c)> action_method)
Definition: actionCallback.cpp:20
void execute(scxml4cpp::Context *c)
Definition: actionCallback.cpp:33
Definition: Action.h:66
Definition: Context.h:58
Exception classes header file.
Definition: actionsApp.cpp:20
SMEvent class header file.