SMACC2
Loading...
Searching...
No Matches
smacc_types.hpp
Go to the documentation of this file.
1// Copyright 2021 RobosoftAI Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*****************************************************************************************************************
16 *
17 * Authors: Pablo Inigo Blasco, Brett Aldrich
18 *
19 ******************************************************************************************************************/
20
21#pragma once
22
23#include <boost/statechart/transition.hpp>
24
25namespace smacc2
26{
27class ISmaccState;
28class ISmaccStateMachine;
29class ISmaccClient;
30class ISmaccUpdatable;
31class ISmaccComponent;
32class ISmaccClientBehavior;
33class SmaccClientBehavior;
34class SmaccAsyncClientBehavior;
35class SignalDetector;
36
37class StateReactor;
38class SmaccEventGenerator;
39
40namespace client_bases
41{
42class ISmaccActionClient;
43class ISmaccSubscriber;
44} // namespace client_bases
45
46namespace introspection
47{
48class SmaccStateMachineInfo;
49class SmaccStateInfo;
50class StateReactorHandler;
51class SmaccStateReactorInfo;
52class SmaccEventGeneratorInfo;
53class TypeInfo;
54} // namespace introspection
55
56// ----TAGS FOR TRANSITIONS -----
57
58namespace default_transition_tags
59{
60// you can also use these other labels in order to have
61// a better code readability and also to improve the visual representation
62// in the viewer
63struct DEFAULT
64{
65};
66
67struct ABORT
68{
69};
70
71struct SUCCESS
72{
73};
74
75struct CANCEL
76{
77};
78
79/*
80struct PREEMPT
81{
82};
83
84
85struct REJECT
86{
87};*/
88
90{
91};
92struct ENDLOOP
93{
94};
95
97{
98};
99} // namespace default_transition_tags
100
101template <
102 class Event, class Destination, typename Tag = default_transition_tags::default_transition_name,
103 class TransitionContext = boost::statechart::detail::no_context<Event>,
104 void (TransitionContext::*pTransitionAction)(const Event &) =
105 &boost::statechart::detail::no_context<Event>::no_function>
106class Transition;
107
108} // namespace smacc2