You.i Engine
YiStateMachine.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_STATE_MACHINE_H_
3 #define _YI_STATE_MACHINE_H_
4 
5 #include "deprecated/YiState.h"
6 #include "signal/YiSignal.h"
7 
8 class CYIEvent;
10 
11 namespace yi
12 {
18 namespace deprecated
19 {
20 class CYIStateMachinePriv;
21 
31 
33 
41 
43 
53 class CYIStateMachine : public CYIState
54 {
55 public:
56  CYIStateMachine(CYIState *parent = 0);
57  virtual ~CYIStateMachine();
58 
62  bool Start();
66  bool Stop();
70  bool IsRunning();
71 
75  std::list<CYIAbstractState *> GetConfiguration();
76 
80  void PrintConfiguration();
81 
85  YI_STATEMACHINE_ERROR GetError();
89  void ClearError();
90 
94  void PostEvent(std::unique_ptr<CYIEvent> e, YI_STATEMACHINE_PRIORITY priority = YI_STATEMACHINE_NORMAL);
95 
104 };
105 
106 } //namespace deprecated
107 
110 } //namespace yi
111 
112 #endif // _YI_STATE_MACHINE_H_
Definition: YiAbstractSignalTransition.h:7
Definition: YiStateMachine.h:39
CYISignal Started
Definition: YiStateMachine.h:99
CYIStateMachine(CYIState *parent=0)
No error is present.
Definition: YiStateMachine.h:26
std::list< CYIAbstractState * > GetConfiguration()
Base class for events.
Definition: YiEvent.h:489
This class defines a hierarchical state machine.
Definition: YiStateMachine.h:53
A CYITransition was encountered with source and destination inside different CYIStateMachine instance...
Definition: YiStateMachine.h:29
YI_STATEMACHINE_ERROR_ENUM
The possible error codes that a CYIStateMachine can encounter during execution.
Definition: YiStateMachine.h:25
Definition: YiStateMachine.h:38
enum yi::deprecated::YI_STATEMACHINE_PRIORITY_ENUM YI_STATEMACHINE_PRIORITY
The priority for posting events to a CYIStateMachine.
Definition: YiStateMachine.h:40
void PostEvent(std::unique_ptr< CYIEvent > e, YI_STATEMACHINE_PRIORITY priority=YI_STATEMACHINE_NORMAL)
A CYIState was entered which had child states but no intial state.
Definition: YiStateMachine.h:27
A CYIHistoryState was entered with no history recorded and no default state specified.
Definition: YiStateMachine.h:28
enum yi::deprecated::YI_STATEMACHINE_ERROR_ENUM YI_STATEMACHINE_ERROR
The possible error codes that a CYIStateMachine can encounter during execution.
YI_STATEMACHINE_PRIORITY_ENUM
The priority for posting events to a CYIStateMachine.
Definition: YiStateMachine.h:37
CYISignal Stopped
Definition: YiStateMachine.h:103
YI_STATEMACHINE_ERROR GetError()
Stores, queues and dispatches events as well as sending notifications to IYIEventDispatcherListener o...
Definition: YiEventDispatcher.h:65
Signals and slots are a thread-safe and flexible communication framework that will allow various obje...
Definition: YiSignal.h:164
A basic state in the state machine.
Definition: YiState.h:23
An internal error occured when starting the thread used by CYIStateMachine.
Definition: YiStateMachine.h:30