|
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 (OpId target) const |
Returns the connections feeding target, ordered by input slot. | |
| std::optional< Connection > | getInputConnection (OpId target, unsigned int inputSlot) const |
Returns the connection on one input slot of target, if any. | |
| std::vector< Connection > | getOutputs (OpId source) const |
Returns the connections leaving source. | |
| void | setCapturedDependencies (const Unit &dependent, const std::vector< Unit > &dependencies) |
| Replaces every captured dependency of one parameter at once. | |
| void | removeNode (OpId opId) |
| Removes every connection and captured edge touching the node. | |
| void | clear () |
| Empties the graph. | |
| std::vector< OpId > | getCookOrder (OpId 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 | ( | OpId | target, |
| unsigned int | inputSlot ) const |
Returns the connection on one input slot of target, if any.
| void enzo::nt::NetworkGraph::setCapturedDependencies | ( | const Unit & | dependent, |
| const std::vector< Unit > & | dependencies ) |
Replaces every captured dependency of one parameter at once.