How tkem/fsmlite works
Project type and purpose
• fsmlite is a lightweight, header-only C++11 finite state machine (FSM) framework (a reusable library), not a standalone application.
• Its goal is to provide a compile-time transition table and runtime engine for defining state machines via C++ templates.
File structure
• Top‐level build and CI:
• .github/workflows/ci.yml, .travis.yml – continuous integration pipelines
• CMakeLists.txt, Makefile.am, autogen.sh, configure.ac, m4/… – GNU Autotools + optional CMake build support
• Source tree:
• src/fsm.h – the single public header defining the fsm template, transition table machinery, row/mem_fn_row helpers
• Tests:
• tests/*.cpp – unit tests showing usage patterns, covering core FSM behavior and template metaprogramming constructs
• Documentation:
• docs/ – Sphinx/ReST sources and Doxygen integration
README for additional insights
• Describes the core abstraction: class fsm<Derived> with a nested transition_table of rows
• Shows example “player” FSM with states, events, guards, and actions
• Points to unit tests as canonical usage examples
Be detailed and capture all architectural elements
• Interplay of template definitions in src/fsm.h with user-supplied Derived classes
• Flow: Autotools → configure → make → make test → make doc
• Don’t hesitate to break down “transition_table” into subcomponents (rows, table, guards, actions) for clarity