Process-wide singleton reactive graph (accessed via Node::graph()).
More...
#include <graph.hpp>
Process-wide singleton reactive graph (accessed via Node::graph()).
◆ Graph() [1/2]
| aria::reactive::Graph::Graph |
( |
| ) |
|
|
inlinedefaultnoexcept |
◆ ~Graph()
| aria::reactive::Graph::~Graph |
( |
| ) |
|
|
defaultnoexcept |
◆ Graph() [2/2]
| aria::reactive::Graph::Graph |
( |
const Graph & | | ) |
|
|
delete |
◆ operator=()
| Graph & aria::reactive::Graph::operator= |
( |
const Graph & | | ) |
|
|
delete |
◆ assert_on_graph_thread()
| void aria::reactive::Graph::assert_on_graph_thread |
( |
| ) |
const |
|
inlinenoexcept |
◆ begin_batch()
| void aria::reactive::Graph::begin_batch |
( |
| ) |
|
|
inlinenoexcept |
Open a new batch. Nesting is legal; the outermost close flushes.
◆ end_batch()
| void aria::reactive::Graph::end_batch |
( |
| ) |
|
|
inline |
Close the current batch; triggers a flush once the outermost batch closes (unless we are already inside a flush).
◆ in_batch()
| bool aria::reactive::Graph::in_batch |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ on_source_changed()
| void aria::reactive::Graph::on_source_changed |
( |
Node & | src | ) |
|
|
inline |
Called after a Source has committed a new value: bumps its version and colors the downstream MaybeDirty.
- Inside a batch: only colors, no flush.
- Outside a batch: a single-shot flush runs immediately.
◆ enqueue_dirty()
| void aria::reactive::Graph::enqueue_dirty |
( |
Node & | n | ) |
|
|
inline |
Enqueue a node into the current flush round's "pending" set.
Typical use: a Reaction node has no value but must still run on flush.
◆ flush()
| void aria::reactive::Graph::flush |
( |
| ) |
|
|
inline |
Evaluate every dirty node in topological order.
Nodes whose recompute() changes the cached value seed a new round by re-coloring their downstream. The loop runs at most kMaxFlushRounds rounds before declaring a cycle.
◆ pull()
| bool aria::reactive::Graph::pull |
( |
Node & | n | ) |
|
|
inline |
Force-evaluate a single node if it is Dirty / MaybeDirty.
Returns true iff the node's version was advanced by this call.
◆ current_tracker()
◆ push_tracker()
◆ pop_tracker()
◆ enter_untracked()
| void aria::reactive::Graph::enter_untracked |
( |
| ) |
|
|
inline |
Enter / leave an untracked scope.
Implemented as pushing a nullptr tracker so current_tracker() returns null inside, which makes dep() behave like a plain read.
◆ leave_untracked()
| void aria::reactive::Graph::leave_untracked |
( |
| ) |
|
|
inline |
◆ Node
The documentation for this class was generated from the following files: