MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / AbstractState

Class AbstractState

lib/StateMachine/src/StateMachine.hpp:62–105  ·  view source on GitHub ↗

* Abstract state interface. */

Source from the content-addressed store, hash-verified

60 * Abstract state interface.
61 */
62class AbstractState
63{
64public:
65
66 /**
67 * Constructs a state.
68 */
69 AbstractState()
70 {
71 }
72
73 /**
74 * Destroys a state.
75 */
76 virtual ~AbstractState()
77 {
78 }
79
80 /**
81 * The entry is called once, a state is entered.
82 *
83 * @param[in] sm Responsible state machine
84 */
85 virtual void entry(StateMachine& sm) = 0;
86
87 /**
88 * The process routine is called cyclic, as long as the state is active.
89 *
90 * @param[in] sm Responsible state machine
91 */
92 virtual void process(StateMachine& sm) = 0;
93
94 /**
95 * The exit is called once, a state will be left.
96 *
97 * @param[in] sm Responsible state machine
98 */
99 virtual void exit(StateMachine& sm) = 0;
100
101private:
102
103 AbstractState(const AbstractState& state);
104 AbstractState& operator=(const AbstractState& state);
105};
106
107/**
108 * Generic state machine.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected