MIRA
StateMachineListener.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) by
3  * MetraLabs GmbH (MLAB), GERMANY
4  * and
5  * Neuroinformatics and Cognitive Robotics Labs (NICR) at TU Ilmenau, GERMANY
6  * All rights reserved.
7  *
8  * Redistribution and modification of this code is strictly prohibited.
9  *
10  * IN NO EVENT SHALL "MLAB" OR "NICR" BE LIABLE TO ANY PARTY FOR DIRECT,
11  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
12  * THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF "MLAB" OR
13  * "NICR" HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14  *
15  * "MLAB" AND "NICR" SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
16  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
18  * ON AN "AS IS" BASIS, AND "MLAB" AND "NICR" HAVE NO OBLIGATION TO
19  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS.
20  */
21 
30 #ifndef _MIRA_STATEMACHINELISTENER_H_
31 #define _MIRA_STATEMACHINELISTENER_H_
32 
33 #include <sm/Transition.h>
34 #include <sm/TransitionTarget.h>
35 
36 
37 namespace mira { namespace sm {
38 
40 
42 {
43 public:
44  virtual ~StateMachineListener() {}
45 
46  virtual void onEntry(TransitionTargetPtr target) = 0;
47  virtual void onExit(TransitionTargetPtr target) = 0;
48  virtual void onTransition(TransitionTargetPtr from, TransitionTargetPtr to, TransitionPtr transition) = 0;
49  virtual void onEvent(Event event) = 0;
50 };
51 
53 
54 }} // namespace
55 
56 #endif
Definition: StateMachineListener.h:41
boost::shared_ptr< TransitionTarget > TransitionTargetPtr
Definition: TransitionTarget.h:54
TODO Add description.
virtual void onEntry(TransitionTargetPtr target)=0
virtual void onExit(TransitionTargetPtr target)=0
Definition: Event.h:49
virtual void onTransition(TransitionTargetPtr from, TransitionTargetPtr to, TransitionPtr transition)=0
boost::shared_ptr< Transition > TransitionPtr
Definition: TransitionTarget.h:57
TODO Add description.
virtual void onEvent(Event event)=0
virtual ~StateMachineListener()
Definition: StateMachineListener.h:44