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

DOTEncoder

mattt edited this page Jul 15, 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

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

shared

let shared

Methods

encode(_:)

Encode the specified graph in DOT language.

public static func encode(_ graph: Graph) -> String

Parameters

  • graph: - 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: - graph: The graph to represent.

Returns

The DOT language representation.

encode(_:in:)

func encode(_ subgraph: Subgraph, in graph: Graph) -> String

encode(_:in:)

func encode(_ node: Node, in graph: Graph) -> String?

encode(_:in:)

func encode(_ edge: Edge, in graph: Graph) -> String

encode(_:in:)

func encode(_ attributes: Graph.Attributes, in graph: Graph) -> [String]

encode(_:in:)

func encode(_ attributes: Subgraph.Attributes, in graph: Graph) -> [String]

encode(_:in:)

func encode(_ attributes: Node.Attributes, in graph: Graph) -> String?

encode(_:in:)

func encode(_ attributes: Edge.Attributes, in graph: Graph) -> String?

encode(_:in:)

private func encode(_ attributes: [String: Any], in graph: Graph) -> [String]?

escape(_:)

private func escape(_ string: String) -> String

Clone this wiki locally