|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
Mounts UI documents (spec 5): one per client process or window, over a session and a dispatcher. More...
#include <interpreter.hpp>
Public Member Functions | |
| Interpreter (Session &session, Dispatcher &dispatcher, InterpreterOptions options={}) | |
| An interpreter. | |
| std::expected< std::unique_ptr< Screen >, Refusal > | mount (std::shared_ptr< Document const > doc, ValueRecord const ¶ms, IViewBackend &backend, MountOptions const &options={}) |
| Mounts a screen. | |
| std::expected< std::unique_ptr< AppRoot >, Refusal > | mountApp (std::shared_ptr< Document const > doc) |
| Mounts the app document as the session's root scope (spec 6 §5). | |
Mounts UI documents (spec 5): one per client process or window, over a session and a dispatcher.
Definition at line 3004 of file interpreter.hpp.
|
inline |
An interpreter.
| session | The session the screens share. Borrowed. |
| dispatcher | Where model calls go. Borrowed. |
| options | The host and the diagnostic callback. |
Definition at line 3010 of file interpreter.hpp.
|
inlinenodiscard |
Mounts a screen.
The document has loaded (loadDocument); what mounting adds is what only the opener knows: the params, and the models a {"from": alias} instance borrows. A param that is missing and not optional, a param of the wrong type, a borrowed model the opener did not lend and a document without a view are refused.
| doc | The document. |
| params | The params, by name; names the document does not declare are ignored. |
| backend | The backend to mount on. Borrowed: it outlives the screen. |
| options | Where to mount, and the models lent. |
Definition at line 7678 of file interpreter.hpp.
|
inlinenodiscard |
Mounts the app document as the session's root scope (spec 6 §5).
Refused: a document whose id is not app, and a second app document while one is mounted on the session.
| doc | The app document, loaded. |
Definition at line 7763 of file interpreter.hpp.