rad 6.2.0
Loading...
Searching...
No Matches
guardCallback.hpp
Go to the documentation of this file.
1
9#ifndef RAD_GUARD_CALLBACK_HPP
10#define RAD_GUARD_CALLBACK_HPP
11
12#include <rad/anyEvent.hpp>
13
14#include <scxml4cpp/Action.h>
15#include <scxml4cpp/Context.h>
16
17#include <functional>
18
19namespace rad {
20
24class GuardCallback final : public scxml4cpp::Action {
25 public:
26 explicit GuardCallback(const std::string& id,
27 std::function<bool(scxml4cpp::Context* c)> guard_method);
28
29 void execute(scxml4cpp::Context* c) override;
30 bool evaluate(scxml4cpp::Context* c) override;
31
34 GuardCallback(const GuardCallback&) = delete;
36
37 private:
38 std::function<bool(scxml4cpp::Context* c)> m_guard_method;
39};
40
41} // namespace rad
42
43#endif // RAD_GUARD_CALLBACK_HPP
Action header.
Context header.
AnyEvent class header file.
Definition guardCallback.hpp:24
GuardCallback(const GuardCallback &)=delete
GuardCallback(const std::string &id, std::function< bool(scxml4cpp::Context *c)> guard_method)
Definition guardCallback.cpp:20
GuardCallback(GuardCallback &&)=default
bool evaluate(scxml4cpp::Context *c) override
Definition guardCallback.cpp:41
GuardCallback & operator=(const GuardCallback &)=delete
Disable copy constructor.
GuardCallback & operator=(GuardCallback &&)=default
void execute(scxml4cpp::Context *c) override
Definition guardCallback.cpp:33
Definition Action.h:66
Definition Context.h:58
Definition actionsApp.cpp:23