Joos1W Compiler Framework
|
A class to help print DOT graphs! More...
#include <DotPrinter.h>
Public Member Functions | |
DotPrinter (ostream &os) | |
Constructor takes in the output stream to print into. | |
DotPrinter (ostream &os, string_view min_height) | |
Constructor takes in the output stream to print into. | |
void | printTableSingleRow (string_view cell_text, string_list cell_attrs={}, bool left_align=false) |
Prints a table row with a single column. | |
void | printTableDoubleRow (string_view cell1_text, string_view cell2_text, string_list cell1_attrs={}, string_list cell2_attrs={}) |
Prints a table row with 2 columns. | |
void | printTableTripleRow (string_view cell1_text, string_view cell2_text, string_view cell3_text, string_list cell1_attrs={}, string_list cell2_attrs={}, string_list cell3_attrs={}) |
Prints a table row with 3 columns. | |
void | startTLabel (int id, string_list attrs={}, string_view cellpadding="1") |
Starts a DOT label that is also an HTML table. | |
void | endTLabel () |
Ends a DOT label that is also an HTML table. | |
void | startLabel (int id, string_list attrs={}) |
Starts a DOT label. | |
void | endLabel () |
Ends a DOT label. | |
void | printLabel (int id, string_view label, string_list attrs={}) |
Prints a DOT label. | |
void | startSubgraph (int id, string_view label="") |
Prints the DOT subgraph { given id. | |
void | endSubgraph () |
Prints the remainder of the DOT subgraph. | |
void | startGraph () |
Prints the DOT graph {. | |
void | endGraph () |
Prints the remainder of the DOT graph. | |
void | printConnection (int from, int to) |
Prints a DOT connection between 2 nodes. | |
void | printBackedge (int from, int to) |
Prints a DOT connection between 2 nodes but it goes against the hierarchy and is dotted red arrow. | |
void | printConnection (int from, string_view port, int to, int lhead_cluster=-1) |
Prints a DOT connection between 2 nodes. More... | |
int | id () |
Allocates a new unique id. | |
template<typename T > | |
int | id (T const *ptr) |
template<typename T > | |
int | getId (T const *ptr) |
void | sanitize (string_view str) |
Print a santized string as a label value. | |
void | print (string_view str) |
Print a single line of indented text. | |
Friends | |
ostream & | operator<< (ostream &os, Sanitize s) |
A class to help print DOT graphs!
Definition at line 10 of file DotPrinter.h.
|
inline |
Prints a DOT connection between 2 nodes.
from | The node from which the connection starts |
port1 | The port of the from node |
to | The node to which the connection ends |
lhead_cluster | If we should connect to a subgraph, the id of it |
Definition at line 167 of file DotPrinter.h.