dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx::Graph::Exporter::Dot Class Reference

Export a dfx::Graph::Controller as a Graphviz DOT string. More...

#include <dfx-graph/exporter/Dot.hpp>

Classes

struct  Style
 Style used when generating a graph in dot format. More...

Public Member Functions

 Dot (Controller const &graph, Style style=defaultStyle())
 Construct a DOT exporter for a given graph controller.
std::string process () const
 Generate the DOT representation of the graph.

Static Public Member Functions

static Style defaultStyle ()
 Returns the default dot format style.

Detailed Description

Export a dfx::Graph::Controller as a Graphviz DOT string.

The exporter references the provided graph controller; it does not take ownership and assumes the controller outlives the exporter instance.

Typicall usage:

auto const result = dfx::Graph::Exporter::Dot(graph).process();
Export a dfx::Graph::Controller as a Graphviz DOT string.
Definition Dot.hpp:40
std::string process() const
Generate the DOT representation of the graph.
Note
This class is a pure formatter: it does not perform I/O.

Constructor & Destructor Documentation

◆ Dot()

dfx::Graph::Exporter::Dot::Dot ( Controller const & graph,
Style style = defaultStyle() )
explicit

Construct a DOT exporter for a given graph controller.

Parameters
graphGraph controller to export (must outlive this object).
styleStyling customization options.

Member Function Documentation

◆ defaultStyle()

Style dfx::Graph::Exporter::Dot::defaultStyle ( )
static

Returns the default dot format style.

◆ process()

std::string dfx::Graph::Exporter::Dot::process ( ) const

Generate the DOT representation of the graph.

The output contains:

  • A directed graph (digraph) named dfx_graph
  • rankdir=LR (left-to-right layout)
  • Record-shaped nodes with labeled input/output ports (when present)
  • Edges connecting output ports to input ports for each channel
Returns
A complete DOT document as a UTF-8 string.

The documentation for this class was generated from the following file: