Display
Public API Reference
This is an exhaustive list of all exported constants, types and functions in CompositeTypes.Display
.
Constants
Functions
CompositeTypes.Display.composite_displaystencil
— Methodcomposite_displaystencil(object; kwargs...)
Default display stencil for composite objects.
The default leads to the representation typename(component1, components2, ...)
, unless the combinationsymbol
of the object is defined differently. In the latter case, if the combination symbol is '+' the stencil leads to component1 + component2 + ...
.
CompositeTypes.Display.composite_show
— Methodcomposite_show(io::IO, ::MIME"text/plain", object)
Display multi-line structured information about a composite object, using the stencil of the object and, recursively, the stencils of any objects therein.
CompositeTypes.Display.composite_show_compact
— Methodcomposite_show_compact(io::IO, object)
Display structured information about a composite object using its stencil, but not recursively.
Types
Internal API Reference
This is an exhaustive list of all non-exported constants, types and functions in CompositeTypes.Display
.
Unexported functions and types are subject to change across different releases of the package, even if the release is said to be non-breaking.
Constants
Functions
CompositeTypes.Display.combinationsymbol
— Methodcombinationsymbol(object)
For composite objects, what is their combination symbol?
By default objects are comma separated, of the form F(a, b, c)
where F
is the constructor function. But they could also have the form a + b + c
. In the former case the combination symbol is a comma, in the latter case it is +
.
CompositeTypes.Display.compact_repr
— Methodcompact_repr(object)
The conventional compact representation of an object.
This representation is based on show(io, d)
. If an object has overriden that method, it can also override this one to avoid a loop.
CompositeTypes.Display.displaystencil
— Methoddisplaystencil(object)
Return the stencil of the object as an array.
The stencil of an object determines how it is displayed. The array may contain characters or strings, and references to other objects. The concatenation of all elements, with the objects replaced by their string representation, forms the representation of the given object.
Example: say an object obj
consists of two parts, obj[1]
and obj[2]
, combined by a function commonly noted as I
. Then the stencil may be: displaystencil(obj) = ["I(", obj[1], ", ", obj[2], ')']
.
In the string representation of the object, both obj[1]
and obj[2]
are replaced by a string, or by a symbol that has its own string representation separately.
CompositeTypes.Display.displaysymbol
— Methoddisplaysymbol(object)
What is the standard display symbol of the object?
CompositeTypes.Display.hasstencil
— Methodhasstencil(object)
Does the object have a stencil?
CompositeTypes.Display.object_parentheses
— Methodobject_parentheses(object)
If this object appears in a more complicated expression, does it require parentheses?
CompositeTypes.Display.stencil_objects
— Methodstencil_objects(object)
Return all objects appearing in the display stencil.
CompositeTypes.Display.stencil_parentheses
— Methodstencil_parentheses(object)
If an object in the stencil is complicated, should we put parentheses around it?