Timo Hocker 6bf85f1605 init
2020-04-17 15:43:34 +02:00

24 lines
575 B
TypeScript

import { Node } from './Node';
import { Edge } from './Edge';
export class Graph extends Node {
public children: Array<Graph> = [];
public nodes: Array<GraphNode> = [];
public is_root = false;
public edges: Array<Edge>;
// eslint-disable-next-line @typescript-eslint/naming-convention
public toString (): string {
return `subgraph cluster_${this.full_name} {
${this.children.map ((c) => c.toString ())
.join ('\n')}
${this.nodes.map ((c) => c.toString ())
.join ('\n')}
${this.edges.map ((c) => c.toString ())
.join ('\n')}
}`;
}
}