Home Reference Source Repository
public class | source

DotGenerator

DotGenerator class allows for generation Fincontract DOT graphs. It delegates the generation of the description tree graph (FincNode tree) to DotGeneratorVisitor and generates the rest of the graph (bounding box and HTML labels). For more details on DOT language see: http://www.graphviz.org.

Example:

import DotGenerator from './fincontract-dot-generator';
const fincontract = ...;
const dg = new DotGenerator();
const graph = dg.generate(fincontract);
... pipe it into a DOT engine ...

Constructor Summary

Public Constructor
public

Constructs DotGenerator object.

Method Summary

Public Methods
public

generate(fincontract: Fincontract): String

Generates Fincontract graph description in DOT language given a Fincontract.

Public Constructors

public constructor() source

Constructs DotGenerator object.

Public Methods

public generate(fincontract: Fincontract): String source

Generates Fincontract graph description in DOT language given a Fincontract. This can be later piped into any DOT engine that supports HTML labels.

Params:

NameTypeAttributeDescription
fincontract Fincontract

a Fincontract to be visualized

Return:

String

a string describing the graph in DOT language