Display

Public API Reference

This is an exhaustive list of all exported constants, types and functions in CompositeTypes.Display.

Constants

Functions

CompositeTypes.Display.composite_displaystencilMethod
composite_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_showMethod
composite_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.

Types

Internal API Reference

This is an exhaustive list of all non-exported constants, types and functions in CompositeTypes.Display.

Warning

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.combinationsymbolMethod
combinationsymbol(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_reprMethod
compact_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.displaystencilMethod
displaystencil(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.

Types