fsm 0.4.1
Header-only C++20 hierarchical table-driven FSM
Loading...
Searching...
No Matches
dot.hpp File Reference

Graphviz (dot) export for fsm machines — a diagram from the same constexpr tables the machine executes, so it can never go stale. More...

#include "fsm/fsm.hpp"
Include dependency graph for dot.hpp:

Go to the source code of this file.

Namespaces

namespace  fsm
 

Functions

template<class Traits , class W >
void fsm::write_dot (W &&write)
 Emit a Graphviz digraph of Traits' machine through write.
 

Detailed Description

Graphviz (dot) export for fsm machines — a diagram from the same constexpr tables the machine executes, so it can never go stale.

Desktop-oriented diagnostics; include only where wanted. Requires FSM_ENABLE_INTROSPECTION (uses the same name plumbing as machine::dump()).

fsm::write_dot<MyTraits>([](const char* line) { puts(line); });
// then: dot -Tsvg machine.dot -o machine.svg