StringHierarchicalRenderer

com.phasmidsoftware.tableparser.core.render.HierarchicalRenderer.StringHierarchicalRenderer
See theStringHierarchicalRenderer companion trait

Implicit object for rendering hierarchical structures as strings.

The StringHierarchicalRenderer provides an implicit instance of the StringHierarchicalRenderer type class, allowing hierarchical data structures to be rendered into a string format. This is useful for cases where hierarchical data needs to be displayed, logged, or processed in textual form.

A StringHierarchicalRenderer is a subtype of UntaggedHierarchicalRenderer[String], enabling the rendering of hierarchy data without requiring specific type tags.

Usage: By importing this implicit object into scope, you can provide a default mechanism for string-based hierarchical rendering for types supporting the StringHierarchicalRenderer trait.

Attributes

Companion
trait
Graph
Supertypes
trait HierarchicalRenderer[String]
trait Renderer[String, Node]
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Inherited methods

def asString(t: String): String

Method to render content as a String. This method is invoked only when T is not a Product, sequence or Option. Normally, the default method is what is required, but it might be necessary to override in some situations. This method does not apply to style or attribute values.

Method to render content as a String. This method is invoked only when T is not a Product, sequence or Option. Normally, the default method is what is required, but it might be necessary to override in some situations. This method does not apply to style or attribute values.

Value parameters

t

the content value.

Attributes

Returns

a String corresponding to t.

Inherited from:
HierarchicalRenderer
def render(t: String, attrs: Map[String, String]): Node

Render an instance of T as a U.

Render an instance of T as a U.

Value parameters

attrs

a map of attributes for this value of U.

t

the input parameter, i.e. the object to be rendered.

Attributes

Returns

a new instance of U.

Inherited from:
UntaggedHierarchicalRenderer
def render(t: String): Node

Render an instance of T as an O, qualifying the rendering with no attributes.

Render an instance of T as an O, qualifying the rendering with no attributes.

Value parameters

t

a T to be rendered.

Attributes

Returns

an instance of type O.

Inherited from:
Renderer

Inherited fields

val baseAttrs: Map[String, String]

Defines the base attribute set for type T.

Defines the base attribute set for type T.

Attributes

Inherited from:
HierarchicalRenderer
val style: String

Defines the default style for type T.

Defines the default style for type T.

Attributes

Inherited from:
UntaggedHierarchicalRenderer