|
Enzo
|
The single owner of the network's wiring and dependencies. More...
#include <NetworkGraph.h>
Public Member Functions | |
| void | connect (const Connection &connection) |
| Records a wired connection between two nodes. | |
| void | disconnect (const Connection &connection) |
| Removes a wired connection between two nodes. | |
| std::vector< Connection > | getInputs (NodeId target) const |
Returns the connections feeding target, ordered by input index. | |
| std::optional< Connection > | getInputConnection (NodeId target, unsigned int inputIndex) const |
Returns the connection on one input of target, if any. | |
| std::vector< Connection > | getOutputs (NodeId source) const |
Returns the connections leaving source. | |
| std::vector< Connection > | getConnections () const |
| Returns every wired connection in the graph, in no particular order. | |
| void | setCapturedDependencies (const Unit &dependent, const std::vector< Unit > &dependencies) |
| Replaces every captured dependency of one parameter at once. | |
| void | setTimeDependent (const Unit &dependent, bool dependsOnTime) |
| Records whether a unit reads the scene time. | |
| std::vector< Unit > | getTimeDependents () const |
| Returns every unit the scene time reaches, in no particular order. | |
| void | removeNode (NodeId nodeId) |
| Removes every connection and captured edge touching the node. | |
| void | clear () |
| Empties the graph. | |
| std::vector< NodeId > | getCookOrder (NodeId target) const |
Returns the nodes to cook before target, in cook order. | |
| std::vector< Unit > | getDependents (const Unit &changed) const |
Returns everything that depends on changed, directly or through a chain. | |
The single owner of the network's wiring and dependencies.
Wired connections are the physical links between nodes. They are the ground truth of the topology and the only edges the cook order considers. Captured dependencies are expression references seen while a parameter evaluates. They are stored for invalidation and never take part in scheduling.
Every edge points from the value depended upon to the value that reads it, so the dependents of a unit are everything that must update when it changes.
Returns the nodes to cook before target, in cook order.
Returns everything that depends on changed, directly or through a chain.
| std::optional< Connection > enzo::nt::NetworkGraph::getInputConnection | ( | NodeId | target, |
| unsigned int | inputIndex ) const |
Returns the connection on one input of target, if any.
| std::vector< Unit > enzo::nt::NetworkGraph::getTimeDependents | ( | ) | const |
Returns every unit the scene time reaches, in no particular order.
| void enzo::nt::NetworkGraph::setCapturedDependencies | ( | const Unit & | dependent, |
| const std::vector< Unit > & | dependencies ) |
Replaces every captured dependency of one parameter at once.
| void enzo::nt::NetworkGraph::setTimeDependent | ( | const Unit & | dependent, |
| bool | dependsOnTime ) |
Records whether a unit reads the scene time.