|
Enzo
|
The world a single expression evaluation reads and writes to. More...
#include <ExpressionContext.h>
Public Member Functions | |
| ExpressionContext (nt::NodeId currentNode) | |
| nt::NodeId | currentNode () const |
| The node a relative parameter path resolves against. | |
| template<typename Value > | |
| std::optional< Value > | readParameter (const String &path, unsigned int index) const |
| Returns a parameter's value, evaluated on the first read and reused after. | |
| const std::vector< nt::Unit > & | getExpressionDependencies () const |
| Every parameter the expression read during this evaluation. | |
| void | recordTimeDependency () const |
| Notes that the expression read the scene time. | |
| bool | dependsOnTime () const |
| Returns whether the expression read the scene time during this evaluation. | |
The world a single expression evaluation reads and writes to.
One of these lives for the span of one evaluation, and a script run shares one across all its threads.
Parameter functions like prm() take a path that may be relative, so they need to know which node the expression belongs to.
It also keeps track of dependencies, like other parameters. Once all the dependencies are known they are passed to the network graph at once, so it can use them for tracking updates.
| template std::optional< String > enzo::expr::ExpressionContext::readParameter< String > | ( | const String & | path, |
| unsigned int | index ) const |
Returns a parameter's value, evaluated on the first read and reused after.