Content Context
object ContentContext
DSL utilities for defining the initial contents of a Node.
This context provides helpers to:
build concentrations using the current Incarnation;
assign concentrations to a Node using the unary minus operator.
The API is based on Kotlin context receivers: the required Incarnation and/or Node are expected to be available in the current context.
Functions
Link copied to clipboard
Creates a concentration value using the current Incarnation.
Link copied to clipboard
context(incarnation: Incarnation<T, *>, node: Node<T>)
operator fun <T> Molecule.invoke(concentration: T = incarnation.createConcentration())
operator fun <T> Molecule.invoke(concentration: T = incarnation.createConcentration())
Assigns the given concentration to this Molecule on the current Node.
context(incarnation: Incarnation<T, *>, node: Node<T>)
operator fun <T> String.invoke(concentration: T = incarnation.createConcentration())
operator fun <T> String.invoke(concentration: T = incarnation.createConcentration())
Create the Molecule identified by this string using the current Incarnation and assign it the provided concentration on the current Node.
Link copied to clipboard