Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Loading...
Searching...
No Matches
aria::reactive Namespace Reference

Classes

class  BatchScope
 RAII batch guard: { BatchScope b; ...; } or use batch([&]{...}). More...
class  CircularDependencyError
 Thrown when flush detects a dependency cycle. More...
class  Computed
struct  Edge
 A single dependency edge: (upstream source) -> (downstream observer). More...
class  Effect
class  Graph
 Process-wide singleton reactive graph (accessed via Node::graph()). More...
class  GraphInspector
 Lightweight diagnostics entry point. More...
class  Node
 Common base for every node participating in the reactive graph. More...
class  Property
struct  ReadRecord
 One "upstream read" record. More...
class  TrackerScope
 RAII: push a tracker on construction, pop on destruction. More...
class  TrackingContext
 Per-recompute tracking context for a single Derivation evaluation. More...
class  UntrackedScope
 RAII: within the scope, every dep() behaves like a plain get(). More...

Typedefs

using FlushTraceFn

Enumerations

enum class  NodeKind : std::uint8_t { Source , Derivation , Reaction }
enum class  NodeState : std::uint8_t { Clean = 0 , MaybeDirty = 1 , Dirty = 2 , Computing = 3 }

Functions

template<class Reactive>
requires ::aria::ReactiveNode< Reactive > void dep (Reactive &r)
std::shared_ptr< FlushTraceFn > & flush_trace_hook_ () noexcept
TrackingContextcurrent_tracker () noexcept
 Returns the current tracker of the global graph.
template<class Fn>
auto untracked (Fn &&fn) -> decltype(fn())
 Sugar: untracked([&]{ ... }).
template<class Fn>
auto batch (Fn &&fn) -> decltype(fn())
 Sugar: batch([&]{ firstName = "..."; lastName = "..."; }).
Graphgraph_instance () noexcept

Typedef Documentation

◆ FlushTraceFn

Initial value:
std::function<void(int phase,
const Node* node,
int round,
bool changed)>
Common base for every node participating in the reactive graph.
Definition node.hpp:136

Enumeration Type Documentation

◆ NodeKind

enum class aria::reactive::NodeKind : std::uint8_t
strong
Enumerator
Source 
Derivation 
Reaction 

◆ NodeState

enum class aria::reactive::NodeState : std::uint8_t
strong
Enumerator
Clean 
MaybeDirty 
Dirty 
Computing 

Function Documentation

◆ dep()

template<class Reactive>
requires ::aria::ReactiveNode< Reactive > void aria::reactive::dep ( Reactive & r)

◆ flush_trace_hook_()

std::shared_ptr< FlushTraceFn > & aria::reactive::flush_trace_hook_ ( )
noexcept

◆ current_tracker()

TrackingContext * aria::reactive::current_tracker ( )
inlinenodiscardnoexcept

Returns the current tracker of the global graph.

Used internally by Property / AutoComputed.

◆ untracked()

template<class Fn>
auto aria::reactive::untracked ( Fn && fn) -> decltype(fn())

Sugar: untracked([&]{ ... }).

Matches the MobX/SolidJS naming so users coming from those ecosystems feel at home.

◆ batch()

template<class Fn>
auto aria::reactive::batch ( Fn && fn) -> decltype(fn())

Sugar: batch([&]{ firstName = "..."; lastName = "..."; }).

◆ graph_instance()

Graph & aria::reactive::graph_instance ( )
noexcept