DOTEncoder - SwiftDocOrg/GraphViz GitHub Wiki
DOTEncoder
Creates DOT language representations of GraphViz graphs.
public struct DOTEncoder
For more information about the DOT language, see https://www.graphviz.org/doc/info/lang.html.
Initializers
init()
Creates a new DOT encoder.
public init()
Properties
indentation
The number of spaces used for indentation; 2 by default.
var indentation: Int = 2
statementDelimiter
The delimiter used for statements.
var statementDelimiter: Delimiter?
attributeDelimiter
The delimiter used for attributes.
var attributeDelimiter: Delimiter?
omitEmptyNodes
Whether to omit node statements that comprise only an ID.
var omitEmptyNodes: Bool = true
Methods
encode(_:)
Encode the specified graph in DOT language.
public static func encode(_ graph: Graph) -> String
Parameters
- graph: The graph to represent.
Returns
The DOT language representation.
encode(_:)
Encode the specified graph in DOT language.
public func encode(_ graph: Graph) -> String
Parameters
- graph: The graph to represent.
Returns
The DOT language representation.