HierarchicalRenderer

com.phasmidsoftware.tableparser.core.render.HierarchicalRenderer
See theHierarchicalRenderer companion object
trait HierarchicalRenderer[T] extends Renderer[T, Node]

Definition of type class HierarchicalRenderer for the purpose of serializing objects of type T. Since, in general, T will be a case class which may include parameters which are case classes, we render to a hierarchical type: Node.

Type parameters

T

the type of object to be rendered.

Attributes

Companion
object
Graph
Supertypes
trait Renderer[T, Node]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def render(t: T, 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.

Concrete methods

def asString(t: T): 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 methods

def render(t: T): 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

Abstract fields

val style: String

Defines the default style for type T.

Defines the default style for type T.

Attributes

Concrete fields

val baseAttrs: Map[String, String]

Defines the base attribute set for type T.

Defines the base attribute set for type T.

Attributes