---------------------------------------------------------------------------- 2. State Machine Base Class Declaration
| 14 | // 2. State Machine Base Class Declaration |
| 15 | // |
| 16 | struct Switch : tinyfsm::Fsm<Switch> |
| 17 | { |
| 18 | virtual void react(Toggle const &) { }; |
| 19 | |
| 20 | // alternative: enforce handling of Toggle in all states (pure virtual) |
| 21 | //virtual void react(Toggle const &) = 0; |
| 22 | |
| 23 | virtual void entry(void) { }; /* entry actions in some states */ |
| 24 | void exit(void) { }; /* no exit actions */ |
| 25 | |
| 26 | // alternative: enforce entry actions in all states (pure virtual) |
| 27 | //virtual void entry(void) = 0; |
| 28 | }; |
| 29 | |
| 30 | |
| 31 | // ---------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected