Public Member Functions | |
| ReactiveSession (Engine &engine) | |
| The engine is NOT owned; the session must outlive uses of it with that engine (workspace state is shared). | |
| bool | load (const std::string &source) |
| Parse source, compute facts + DAG, run the initial FULL pass (whole-source eval — script/function semantics identical to a plain run). | |
| void | setParam (const std::string &var, Value value) |
| Whole-variable parameter write (Play sliders). | |
| void | setParamElement (const std::string &var, size_t r, size_t c, Value value) |
| Single-cell write (the reactive table editor). | |
| size_t | evalDirty () |
| Execute the dirty statements in source order through the per-statement seam. | |
| bool | hasDirty () const |
| True when something is pending for evalDirty(). | |
| std::vector< std::vector< size_t > > | detectCycles () const |
| Tarjan SCCs over the dependency edges (invariant guard — expected empty while edges stay forward-only). | |
| const DependencyGraph & | graph () const |
| size_t | statementCount () const |
| const std::string & | lastError () const |
| uint64_t | generation () const |
| Bumped on every committed write (param/element/evalDirty) — the buffer-generation source for zero-copy array views (portion C). | |
Definition at line 50 of file reactive_session.hpp.
| size_t nk::ReactiveSession::evalDirty | ( | ) |
Execute the dirty statements in source order through the per-statement seam.
Returns how many ran; on error, stops and keeps the remaining dirty set (see lastError()).
|
inline |
Bumped on every committed write (param/element/evalDirty) — the buffer-generation source for zero-copy array views (portion C).
Definition at line 92 of file reactive_session.hpp.
|
inline |
Definition at line 86 of file reactive_session.hpp.
|
inline |
True when something is pending for evalDirty().
Definition at line 80 of file reactive_session.hpp.
|
inline |
Definition at line 88 of file reactive_session.hpp.
| bool nk::ReactiveSession::load | ( | const std::string & | source | ) |
Parse source, compute facts + DAG, run the initial FULL pass (whole-source eval — script/function semantics identical to a plain run).
Returns false on parse or initial-run error (see lastError()).
| void nk::ReactiveSession::setParam | ( | const std::string & | var, |
| Value | value ) |
Whole-variable parameter write (Play sliders).
Marks the dependency-dirty set; the script's own pure definitions of the variable are skipped (the param replaces them).
| void nk::ReactiveSession::setParamElement | ( | const std::string & | var, |
| size_t | r, | ||
| size_t | c, | ||
| Value | value ) |
Single-cell write (the reactive table editor).
Native cell assignment via the engine; marks the ELEMENT-dirty set — only formulas whose READ regions touch (r,c) re-run.
|
inline |
Definition at line 87 of file reactive_session.hpp.