com.phasmidsoftware.tableparser.core.render.TableRenderable
Polymorphic trait which defines the behavior of some sort of collection with an underlying type X and which can be rendered.
CONSIDER: do we really need this trait? This trait is not, strictly speaking, a typeclass because X does not appear as a parameter or result of any of the methods. However, it cannot be sealed which implies that it is used as a typeclass.
NOTE: this trait has no direct relationship with Renderer. CONSIDER a refactoring of the whole set of traits.
Type parameters
X
the underlying type of this TableRenderable.
Attributes
Graph
Reset zoom Hide graph Show graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Members list
Method to render this TableRenderable to serialized type O without any constraint on O.
Method to render this TableRenderable to serialized type O without any constraint on O.
NOTE this is currently used only by the json module's JsonTableRendererSpec
CONSIDER combining this with renderToWritable.
CONSIDER generalizing the type of ev.
Type parameters
O
the type of the result.
Value parameters
ev
implicit evidence for Renderer of Table of X.
Attributes
Returns
an instance of O.
Method to render a table in a hierarchical fashion.
Method to render a table in a hierarchical fashion.
TESTME
NOTE: if your output structure is not hierarchical in nature, then simply loop through the rows of this table, outputting each row as you go.
Type parameters
U
a class which supports TreeWriter (i.e. there is evidence of TreeWriter[U]).
Value parameters
attributes
the attributes to be applied to the top level node for this table.
style
the "style" to be used for the node which will represent this table.
xr
an (implicit) HierarchicalRenderer[Row]
Attributes
Returns
a new instance of U which represents this Table as a tree of some sort.
Method to render a table in a hierarchical fashion.
Method to render a table in a hierarchical fashion.
TESTME
NOTE: if your output structure is not hierarchical in nature, then simply loop through the rows of this table, outputting each row as you go.
Type parameters
U
a class which supports TreeWriter (i.e. there is evidence of TreeWriter[U]).
Value parameters
attributes
the attributes to be applied to the top level node for this table.
style
the "style" to be used for the node which will represent this table.
xr
an (implicit) HierarchicalRenderer[ Indexed [ Row ] ]
Attributes
Returns
a new instance of U which represents this Table as a tree of some sort.
NOTE this is never used
CONSIDER redefining the definition of Renderer such that we can accommodate the various different types of output.
Method to render a table in a sequential (serialized) fashion.
Type parameters
O
a type which supports Writable (via evidence of type Writable[O])
Attributes
Returns
a new (or possibly old) instance of O.