19 template <
class EventT,
class RobotSystemT,
class LogicStateMachineT>
28 virtual void run(EventT
const &event, RobotSystemT &robot_system) = 0;
36 template <
class FSM,
class SourceState,
class TargetState>
37 void operator()(EventT
const &event, FSM &logic_state_machine, SourceState &,
40 std::is_convertible<decltype(
41 logic_state_machine.robot_system_container_()),
42 RobotSystemT &>::value,
43 "Robot system in logic state machine is not the same as one used in "
46 std::is_base_of<FSM, LogicStateMachineT>::value,
47 "Template Logic state machine arg is not subclass of provided FSM");
48 run(event, logic_state_machine.robot_system_container_());
67 template <
class EventT,
class RobotSystemT,
class LogicStateMachineT>
76 virtual bool guard(EventT
const &event, RobotSystemT &robot_system) = 0;
84 template <
class FSM,
class SourceState,
class TargetState>
85 bool operator()(EventT
const &event, FSM &logic_state_machine, SourceState &,
88 std::is_convertible<decltype(
89 logic_state_machine.robot_system_container_()),
90 RobotSystemT &>::value,
91 "Robot system in logic state machine is not the same as one used in "
94 std::is_base_of<FSM, LogicStateMachineT>::value,
95 "Template Logic state machine arg is not subclass of provided FSM");
96 return guard(event, logic_state_machine.robot_system_container_());
112 template <
class RobotSystemT,
class LogicStateMachineT>
120 virtual void run(RobotSystemT &robot_system) = 0;
127 template <
class EventT,
class FSM,
class SourceState,
class TargetState>
128 void operator()(EventT
const &, FSM &logic_state_machine, SourceState &,
131 std::is_convertible<decltype(
132 logic_state_machine.robot_system_container_()),
133 RobotSystemT &>::value,
134 "Robot system in logic state machine is not the same as one used in "
137 std::is_base_of<FSM, LogicStateMachineT>::value,
138 "Template Logic state machine arg is not subclass of provided FSM");
139 run(logic_state_machine.robot_system_container_());
156 template <
class RobotSystemT,
class LogicStateMachineT>
164 virtual bool guard(RobotSystemT &robot_system) = 0;
171 template <
class EventT,
class FSM,
class SourceState,
class TargetState>
172 bool operator()(EventT
const &, FSM &logic_state_machine, SourceState &,
175 std::is_convertible<decltype(
176 logic_state_machine.robot_system_container_()),
177 RobotSystemT &>::value,
178 "Robot system in logic state machine is not the same as one used in "
181 std::is_base_of<FSM, LogicStateMachineT>::value,
182 "Template Logic state machine arg is not subclass of provided FSM");
183 return guard(logic_state_machine.robot_system_container_());
207 template <
class RobotSystemT,
class LogicStateMachineT>
220 virtual bool run(RobotSystemT &robot_system,
221 LogicStateMachineT &logic_state_machine) = 0;
228 template <
class EventT,
class FSM,
class SourceState,
class TargetState>
229 bool operator()(EventT
const &, FSM &logic_state_machine, SourceState &,
232 std::is_convertible<decltype(
233 logic_state_machine.robot_system_container_()),
234 RobotSystemT &>::value,
235 "Robot system in logic state machine is not the same as one used in "
238 std::is_base_of<FSM, LogicStateMachineT>::value,
239 "Template Logic state machine arg is not subclass of provided FSM");
240 LogicStateMachineT *logic_state_machine_cast =
241 static_cast<LogicStateMachineT *
>(&logic_state_machine);
242 return run(logic_state_machine.robot_system_container_(),
243 *logic_state_machine_cast);
void operator()(EventT const &, FSM &logic_state_machine, SourceState &, TargetState &)
operator () Internally calls run function
Definition: base_functors.h:128
virtual bool guard(RobotSystemT &robot_system)=0
Override this run function for different sub classes. This function performs the logic checking for e...
virtual ~GuardFunctor()
Destructor.
Definition: base_functors.h:101
Internal action that returns whether it processed an event.
Definition: base_functors.h:208
Action functor that does not require the event triggering it.
Definition: base_functors.h:113
virtual ~EventAgnosticGuardFunctor()
virtual destructor to get polymorphism
Definition: base_functors.h:189
virtual bool guard(EventT const &event, RobotSystemT &robot_system)=0
Override this guard function for different sub classes. This function decides whether to call the run...
Action Functor for a given event, robot system, state machine.
Definition: base_functors.h:68
virtual ~ActionFunctor()
Virtual destructor to obtain polymorphism.
Definition: base_functors.h:54
Action Functor for a given event, robot system, state machine.
Definition: base_functors.h:20
virtual void run(EventT const &event, RobotSystemT &robot_system)=0
Override this run function for different sub classes. This function performs the logic checking for e...
bool operator()(EventT const &, FSM &logic_state_machine, SourceState &, TargetState &)
operator () Internally calls run function
Definition: base_functors.h:229
void operator()(EventT const &event, FSM &logic_state_machine, SourceState &, TargetState &)
operator () Internally calls run function
Definition: base_functors.h:37
Guard functor that does not require the event triggering it.
Definition: base_functors.h:157
virtual ~EventAgnosticActionFunctor()
virtual destructor to get polymorphism
Definition: base_functors.h:145
virtual ~InternalActionFunctor()
virtual destructor to get polymorphism
Definition: base_functors.h:249
bool operator()(EventT const &, FSM &logic_state_machine, SourceState &, TargetState &)
operator () Internally calls run function
Definition: base_functors.h:172
virtual void run(RobotSystemT &robot_system)=0
Override this run function for different sub classes. This function performs the logic checking for e...
bool operator()(EventT const &event, FSM &logic_state_machine, SourceState &, TargetState &)
operator () Internally calls guard function
Definition: base_functors.h:85
virtual bool run(RobotSystemT &robot_system, LogicStateMachineT &logic_state_machine)=0
Override this run function for different sub classes. This function performs the logic checking for e...