class RTNode
RTNode of evaluating an expression.
RTNodes form a tree that controls execution order and message between Ops.
index
members
-
rtnode:is_const()
– return whether this RTNode’s result is const. -
rtnode:const([msg])
– assert result-constness and return the result. -
rtnode:type()
– assert this result has a result, return its type. -
rtnode:metatype()
– assert this result has a result, returns its metatype. -
rtnode:make_ref()
– create a copy of this result with result-copy semantics. -
rtnode:poll_io()
– poll all IO Ops effecting this (sub)tree for changes. -
rtnode:tick()
– in depth-first order, tick all Ops which have dirty Inputs. -
rtnode.result
– the Result result. -
rtnode.op
– an Op. -
rtnode.children
– list of child RTNodes from subexpressions. -
rtnode.io_ops
– cached list of all IO Ops inside this RTNode and children. -
rtnode.side_inputs
– cached mapping of all Result/Input pairs affecting this RTNode.
static functions
-
RTNode(params)
– create a new RTNode.
details
members
-
– return whether this RTNode’s result is const.
-
– assert result-constness and return the result.
parameters:
- the error message to throw (optional)
returns:
- (any)
-
– assert this result has a result, return its type.
returns:
- (string)
-
– assert this result has a result, returns its metatype.
returns:
-
(string):
"result"
or"event"
-
(string):
-
– create a copy of this result with result-copy semantics.
the copy has the same @result and @side_inputs, but will not (doubly)update anything on tick or
poll
. -
– poll all IO Ops effecting this (sub)tree for changes.
should be called once per frame on the root, right before tick.
returns:
- (optional boolean): whether any IO Op marked itself dirty.
-
– in depth-first order, tick all Ops which have dirty Inputs.
short-circuits if there are no dirty Inputs in the entire subtree
-
– the Result result.
-
– an Op.
-
– list of child RTNodes from subexpressions.
-
– cached list of all IO Ops inside this RTNode and children.
-
– cached mapping of all Result/Input pairs affecting this RTNode.
This is the union of all childrens side_inputs and all Inputs from op that are not the result of any child.
static functions
-
– create a new RTNode.
parameters:
- table with optional keys op, result, children. default: {}