morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::AppRoot Class Reference

The app document mounted as the root scope every screen of the session shares (spec 6 §5). More...

#include <interpreter.hpp>

Public Member Functions

 AppRoot (AppRoot const &)=delete
AppRoot & operator= (AppRoot const &)=delete
 AppRoot (AppRoot &&)=delete
AppRoot & operator= (AppRoot &&)=delete
 ~AppRoot ()
 Runs onUnmount, takes the scope off the session, and releases everything.
Value read (Json const &expression) const
 Evaluates an expression in the app document's scope.
std::vector< Refusal > const & diagnostics () const noexcept
 The diagnostics reported so far.

Detailed Description

The app document mounted as the root scope every screen of the session shares (spec 6 §5).

Its state, lets, queries and mutations live once for the session. A screen reads them as {"ref": "app.name"}, a binding on one updates, and {"set": "app.name", …} writes the app document's state. A query of the app document runs once however many screens read it. Destroying the root runs its onUnmount, takes its scope off the session and releases its model instances; a host does that before it clears the session on sign-out.

Definition at line 2952 of file interpreter.hpp.

Constructor & Destructor Documentation

◆ ~AppRoot()

morph::ui::AppRoot::~AppRoot ( )
inline

Runs onUnmount, takes the scope off the session, and releases everything.

Definition at line 2960 of file interpreter.hpp.

Member Function Documentation

◆ read()

Value morph::ui::AppRoot::read ( Json const & expression) const
inlinenodiscard

Evaluates an expression in the app document's scope.

Parameters
expressionThe expression's JSON.
Returns
Its value; null for an expression that does not parse.

Definition at line 2974 of file interpreter.hpp.

◆ diagnostics()

std::vector< Refusal > const & morph::ui::AppRoot::diagnostics ( ) const
inlinenodiscardnoexcept

The diagnostics reported so far.

Returns
They.

Definition at line 2984 of file interpreter.hpp.


The documentation for this class was generated from the following file: