initial commit
This commit is contained in:
commit
44a768a6c0
6 changed files with 278 additions and 0 deletions
18
README.md
Normal file
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# State machine generator
|
||||
|
||||
This tool is used to describe a state machine in dot format (used by Graphviz).
|
||||
It then generates the corresponding C++ code with identified callbacks.
|
||||
|
||||
## Usage
|
||||
- Create a Python3 virtualenv with pydot installed
|
||||
- Create a dot file with the state machine named "state_machine.gv"
|
||||
- Run 'make png' to see the PNG representation
|
||||
- Run 'make cpp' to generate the C++ code
|
||||
|
||||
## C++ code
|
||||
The tool will generate 3 files:
|
||||
- 'state_machine.h' and 'state_machine.cpp' that contain the skeleton of the
|
||||
state machine
|
||||
- 'state_impl.cpp' that contains the empty callbacks
|
||||
|
||||
You can compile these sources with a simple main like the one provided.
|
Loading…
Add table
Add a link
Reference in a new issue