Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

DOTEncoder

mattt edited this page Nov 16, 2020 · 3 revisions

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.

Clone this wiki locally