|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A Dispatcher over the bridge's model-free seams: bindByType, executeRaw and the string-keyed attach, through RawHandler. More...
#include <interpreter.hpp>
Public Member Functions | |
| BridgeDispatcher (bridge::Bridge &bridge, exec::IExecutor *cbExec, Evaluator evaluator={}) | |
Dispatches through bridge, and evaluates through evaluator. | |
| std::shared_ptr< ModelChannel > | bind (std::string const &typeId, bridge::BindSharing sharing, std::string const &instanceKey) override |
| Binds through a RawHandler. | |
| Public Member Functions inherited from morph::ui::Dispatcher | |
| Dispatcher (Dispatcher const &)=delete | |
| Dispatcher & | operator= (Dispatcher const &)=delete |
| Dispatcher (Dispatcher &&)=delete | |
| Dispatcher & | operator= (Dispatcher &&)=delete |
A Dispatcher over the bridge's model-free seams: bindByType, executeRaw and the string-keyed attach, through RawHandler.
An evaluation goes through the Evaluator it was given, since that envelope belongs to the UI service, not the bridge; without one it is refused with a std::runtime_error. It has no offline queue of its own: queueOffline is ignored unless a QueueingDispatcher wraps it. A shared binding without a key is bound unattached, which the bridge refuses at the first call; the interpreter never binds one, since a "shared" alias is a stateless model's and binds privately.
Definition at line 125 of file interpreter.hpp.
|
inline |
Dispatches through bridge, and evaluates through evaluator.
| bridge | The bridge. Borrowed: it must outlive every channel. |
| cbExec | The executor replies are delivered on: the runtime's owner. Borrowed. |
| evaluator | What answers an evaluate query; empty to refuse them. |
Definition at line 131 of file interpreter.hpp.
|
inlinenodiscardoverridevirtual |
Binds through a RawHandler.
| typeId | The model's registered type id. |
| sharing | Private, or shared. |
| instanceKey | For a shared binding, the key to attach to; empty to stay unattached. |
Implements morph::ui::Dispatcher.
Definition at line 140 of file interpreter.hpp.