Search Results for

    Show / Hide Table of Contents

    Class StringifierBase<TEdge, TNode>


    Provides concrete properties and defaults for new line, identation and stringifiers.

    Inheritance
    System.Object
    StringifierBase<TEdge, TNode>
    FullyIterativeStringifier<TEdge, TNode>
    FullyRecursiveStringifier<TEdge, TNode>
    Implements
    IStringifier<TEdge, TNode>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: MoreStructures.RecImmTrees.Conversions
    Assembly: MoreStructures.dll
    Syntax
    public abstract class StringifierBase<TEdge, TNode> : IStringifier<TEdge, TNode> where TEdge : IRecImmDictIndexedTreeEdge<TEdge, TNode> where TNode : IRecImmDictIndexedTreeNode<TEdge, TNode>
    Type Parameters
    Name Description
    TEdge

    The type of edges of the specific structure.

    TNode

    The type of nodes of the specific structure.

    Constructors

    | Improve this Doc View Source

    StringifierBase(Func<TNode, String>, Func<TEdge, TNode, String>)

    Builds an instance of an IStringifier<TEdge, TNode> with the provided stringifiers, for the root and for all other nodes in the three, and with default new line and indent.

    Declaration
    protected StringifierBase(Func<TNode, string> rootStringifier, Func<TEdge, TNode, string> edgeAndNodeStringifier)
    Parameters
    Type Name Description
    Func<TNode, System.String> rootStringifier

    Func<TEdge, TNode, System.String> edgeAndNodeStringifier

    Properties

    | Improve this Doc View Source

    EdgeAndNodeStringifier

    A function mapping the provided edge and node to a string. Used for all lines of the output but the first.

    Declaration
    public Func<TEdge, TNode, string> EdgeAndNodeStringifier { get; set; }
    Property Value
    Type Description
    Func<TEdge, TNode, System.String>
    | Improve this Doc View Source

    Indent

    By default is 4 spaces.

    Declaration
    public string Indent { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    NewLine

    By default is .

    Declaration
    public string NewLine { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    PathSeparator

    By default is a single space.

    Declaration
    public string PathSeparator { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    RootStringifier

    A function mapping the top-level node to a string. Used for the first line of the output.

    Declaration
    public Func<TNode, string> RootStringifier { get; set; }
    Property Value
    Type Description
    Func<TNode, System.String>

    Methods

    | Improve this Doc View Source

    Stringify(TNode)

    Converts the provided IRecImmDictIndexedTreeNode<TEdge, TNode> into a string.

    Declaration
    public abstract string Stringify(TNode node)
    Parameters
    Type Name Description
    TNode node

    The root of the tree to stringify.

    Returns
    Type Description
    System.String

    A string version of the provided structure.

    | Improve this Doc View Source

    Stringify(TreePath<TEdge, TNode>)

    Converts the provided TreePath<TEdge, TNode> into a string.

    Declaration
    public abstract string Stringify(TreePath<TEdge, TNode> path)
    Parameters
    Type Name Description
    TreePath<TEdge, TNode> path

    The tree path to stringify.

    Returns
    Type Description
    System.String

    A string version of the provided path.

    Implements

    IStringifier<TEdge, TNode>

    Extension Methods

    SuffixStructureNodeExtensions.GetAllSuffixesFor<TEdge, TNode>(TNode, TextWithTerminator)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX