-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Introduction | ||
|
||
A library for making state machines : | ||
- no dynamic allocation needed | ||
- all states will share a common interface, which may then be used to interact | ||
with states | ||
- transitionning between states is a safe operation (memory owne by the former | ||
state is still valid when constructing the new one) | ||
- a list of allowed transitions can be used to restrict what state changes are | ||
allowed | ||
- one may log state transitions | ||
- states are reusable | ||
|
||
# Usage | ||
|
||
See `test.cc` | ||
|
||
# Limitations | ||
|
||
- When transitionning from a state to another, a deduction guide must be given | ||
for the checker to know from which state the transition comes from. It may be | ||
"fixed" by introducing a state identifier, which is super easy but adds a | ||
performance overhead for little apparent benefit. Introducing a proxy class | ||
which has friendly access for proxying transitions to the automaton sort of | ||
solves the problem, but makes the syntax heavier. | ||
- transitionning to a new state while already constructing a state is undefined | ||
behavior | ||
|
||
# FAQ | ||
|
||
`is it production ready ?` | ||
No, it's a toy, the almost untested™ kind | ||
|
||
`Where's the build system ?` | ||
That's like two header files, what would you like to build ? |