Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Support for generation of Graphviz-DOT code for structure visualisation.
The dot language offers a simple notation to represent structural information as diagrams of abstract graphs and networks. The Graphviz layout programs translate these into automatically arranged diagrams graphs, relying on basic layout schemes like directed and undirected graphs, force-directed placement, radial arrangements, clustered graphs or squarified treemap layout. These visualisations can be rendered as images, vector graphic SVG or PDF and a lot of further formats.
The namespace lib::dot_gen contains a set of integrated builder DSL functions to simplify the task of syntax generation; notable it is possible to set up several sections, which can then be gradually populated with definition clauses while traversing a data structure.
The top-level entrance point is lib::dot_get::digraph(), allowing to combine a series of lib::dot_gen::Section definitions into a DOT script, which can then be retrieved by string conversion (or sent to standard output)
Definition in file dot-gen.hpp.
#include "lib/format-util.hpp"
#include "lib/util.hpp"
#include <utility>
#include <sstream>
#include <string>
#include <vector>
Classes | |
struct | Code |
markup to generate a piece of code More... | |
class | DotOut |
Helper to collect DOT-Graphviz code for output. More... | |
struct | Node |
generate a Node name or a node_statement defining attributes of that node. More... | |
struct | Scope |
accumulator to collect nodes grouped into a scope More... | |
struct | Section |
Accumulator to collect lines of DOT code. More... | |
Functions | |
Code | connect (size_t src, size_t dest) |
generate a directed node connectivity clause | |
template<class... COD> | |
DotOut | digraph (COD ...parts) |
Entrance-point: generate a graph spec in DOT-Language. More... | |
Node | node (size_t id) |
Scope | scope (size_t id) |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |
|
inline |
Entrance-point: generate a graph spec in DOT-Language.
parts | a sequence of Section or Code objects to be combined and rendered |
Definition at line 237 of file dot-gen.hpp.
References lib::dot_gen::digraph().
Referenced by lib::dot_gen::digraph().