|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
One document scope at run time: the screen, a dialog's or drawer's content, a switch case or a row. More...
#include <interpreter.hpp>
Public Member Functions | |
| RtScope (ScreenCore &screen, std::shared_ptr< RtScope > enclosing, reactive::Signal< Value > const *current, std::size_t depth) | |
| An empty scope. | |
| RtScope (RtScope const &)=delete | |
| RtScope & | operator= (RtScope const &)=delete |
| RtScope (RtScope &&)=delete | |
| RtScope & | operator= (RtScope &&)=delete |
| ~RtScope () | |
| Releases what it owns, and tells the dialog it belongs to. | |
| NameRef const * | find (std::string_view name) const |
| Resolves a name, innermost scope first. | |
| reactive::Signal< Value > const * | innermostRow () const |
| The innermost row, from this scope outwards. | |
| RtScope const & | policyScope () const |
| The innermost scope that decides when errors show and is submitted: a dialog's, or the screen's. | |
| bool | ready () const |
| Whether every element of the scope is valid and no blocking check of it fails. A tracked read. | |
Public Attributes | |
| ScreenCore & | core |
| The screen. | |
| std::shared_ptr< RtScope > | parent |
| The enclosing scope. | |
| reactive::Signal< Value > const * | row = nullptr |
| The row of a row scope. | |
| ElementState * | owner = nullptr |
| The dialog or drawer whose content it is. | |
| std::string | showErrors |
| touched, submit or always, for a scope that decides it. | |
| reactive::Signal< bool > * | submitted = nullptr |
| submitted of a scope that decides when errors show. | |
| std::map< std::string, NameRef, std::less<> > | names |
| Its names. | |
| std::vector< std::unique_ptr< StateSlot > > | states |
| Its state. | |
| std::vector< std::unique_ptr< ElementState > > | elements |
| Its elements, in document order. | |
| std::vector< std::unique_ptr< TransferState > > | transfers |
| Its transfers. | |
| std::vector< std::unique_ptr< ModelAlias > > | models |
| Its model aliases. | |
| std::vector< std::unique_ptr< QueryRuntime > > | queries |
| Its queries. | |
| std::vector< std::unique_ptr< MutationRuntime > > | mutations |
| Its mutations. | |
| std::vector< std::unique_ptr< CheckRuntime > > | checks |
| Its checks. | |
| reactive::Scope | nodes |
| The reactive nodes it owns; declared last, so they go first. | |
One document scope at run time: the screen, a dialog's or drawer's content, a switch case or a row.
It lives while anything that reads it does: the view nodes lowered in it hold it by shared_ptr, a reply or a timer holds it weakly. It belongs to a ScreenCore, which outlives it.
Definition at line 1644 of file interpreter.hpp.
|
inline |
An empty scope.
| screen | The screen. |
| enclosing | The enclosing scope; nullptr for the screen and a component fallback. |
| current | The row of a row scope; nullptr otherwise. |
| depth | The reactive scope depth of what it owns. |
Definition at line 3382 of file interpreter.hpp.
|
inline |
Releases what it owns, and tells the dialog it belongs to.
Definition at line 3390 of file interpreter.hpp.
|
inlinenodiscard |
Resolves a name, innermost scope first.
| name | The name. |
Definition at line 1665 of file interpreter.hpp.
|
inlinenodiscard |
The innermost row, from this scope outwards.
Definition at line 1677 of file interpreter.hpp.
|
inlinenodiscard |
The innermost scope that decides when errors show and is submitted: a dialog's, or the screen's.
Definition at line 1688 of file interpreter.hpp.
|
inlinenodiscard |
Whether every element of the scope is valid and no blocking check of it fails. A tracked read.
Definition at line 3403 of file interpreter.hpp.
| ScreenCore& morph::ui::detail::RtScope::core |
The screen.
Definition at line 1701 of file interpreter.hpp.
| std::shared_ptr<RtScope> morph::ui::detail::RtScope::parent |
The enclosing scope.
Definition at line 1703 of file interpreter.hpp.
| reactive::Signal<Value> const* morph::ui::detail::RtScope::row = nullptr |
The row of a row scope.
Definition at line 1705 of file interpreter.hpp.
| ElementState* morph::ui::detail::RtScope::owner = nullptr |
The dialog or drawer whose content it is.
Definition at line 1707 of file interpreter.hpp.
| std::string morph::ui::detail::RtScope::showErrors |
touched, submit or always, for a scope that decides it.
Definition at line 1709 of file interpreter.hpp.
| reactive::Signal<bool>* morph::ui::detail::RtScope::submitted = nullptr |
submitted of a scope that decides when errors show.
Definition at line 1711 of file interpreter.hpp.
| std::map<std::string, NameRef, std::less<> > morph::ui::detail::RtScope::names |
Its names.
Definition at line 1713 of file interpreter.hpp.
| std::vector<std::unique_ptr<StateSlot> > morph::ui::detail::RtScope::states |
Its state.
Definition at line 1715 of file interpreter.hpp.
| std::vector<std::unique_ptr<ElementState> > morph::ui::detail::RtScope::elements |
Its elements, in document order.
Definition at line 1717 of file interpreter.hpp.
| std::vector<std::unique_ptr<TransferState> > morph::ui::detail::RtScope::transfers |
Its transfers.
Definition at line 1719 of file interpreter.hpp.
| std::vector<std::unique_ptr<ModelAlias> > morph::ui::detail::RtScope::models |
Its model aliases.
Definition at line 1721 of file interpreter.hpp.
| std::vector<std::unique_ptr<QueryRuntime> > morph::ui::detail::RtScope::queries |
Its queries.
Definition at line 1723 of file interpreter.hpp.
| std::vector<std::unique_ptr<MutationRuntime> > morph::ui::detail::RtScope::mutations |
Its mutations.
Definition at line 1725 of file interpreter.hpp.
| std::vector<std::unique_ptr<CheckRuntime> > morph::ui::detail::RtScope::checks |
Its checks.
Definition at line 1727 of file interpreter.hpp.
| reactive::Scope morph::ui::detail::RtScope::nodes |
The reactive nodes it owns; declared last, so they go first.
Definition at line 1729 of file interpreter.hpp.