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

The facts load-time validation needs from the application's catalog. Local mode answers them from the model registry in-process, the server at registration, a remote client from the UI service's catalog. More...

#include <document.hpp>

Public Attributes

std::function< std::optional< ModelInfo >(std::string_view typeId)> model
 Looks up a model type by its registered type id.
std::function< std::optional< ActionInfo >(std::string_view actionId)> action
 Looks up an action by its id.
std::function< std::optional< std::string >(std::string_view actionId)> schema
 The schema JSON of an action, as forms::schemaJson<A>() emits it: what a form node builds its form from. Local mode answers it from the action registry, a remote client from the server's schemas. Empty: a form node is reported and shown as a muted text.
std::function< std::optional< std::string >(std::string_view actionId)> view
 The v-* view document whose v-query is an action, as views::viewSchemaJson<V>() emits it: what a collection node naming that action builds its collection from. Empty: a collection node is reported and shown as a muted text.
std::function< std::optional< std::string >(std::string_view actionId)> wizard
 The w-* wizard document whose first step is an action, as flows::wizardSchemaJson<W>() emits it: what a wizard node naming that action builds its wizard from. Empty: a wizard node is reported and shown as a muted text.

Detailed Description

The facts load-time validation needs from the application's catalog. Local mode answers them from the model registry in-process, the server at registration, a remote client from the UI service's catalog.

A lookup left empty skips the rules that need it: model the unknown-model and keyed-instance rules; action the unknown-action, wrong-model, optimistic and offline rules.

Definition at line 105 of file document.hpp.

Member Data Documentation

◆ model

std::function<std::optional<ModelInfo>(std::string_view typeId)> morph::ui::Catalog::model

Looks up a model type by its registered type id.

Definition at line 107 of file document.hpp.

◆ action

std::function<std::optional<ActionInfo>(std::string_view actionId)> morph::ui::Catalog::action

Looks up an action by its id.

Definition at line 109 of file document.hpp.

◆ schema

std::function<std::optional<std::string>(std::string_view actionId)> morph::ui::Catalog::schema

The schema JSON of an action, as forms::schemaJson<A>() emits it: what a form node builds its form from. Local mode answers it from the action registry, a remote client from the server's schemas. Empty: a form node is reported and shown as a muted text.

Definition at line 113 of file document.hpp.

◆ view

std::function<std::optional<std::string>(std::string_view actionId)> morph::ui::Catalog::view

The v-* view document whose v-query is an action, as views::viewSchemaJson<V>() emits it: what a collection node naming that action builds its collection from. Empty: a collection node is reported and shown as a muted text.

Definition at line 117 of file document.hpp.

◆ wizard

std::function<std::optional<std::string>(std::string_view actionId)> morph::ui::Catalog::wizard

The w-* wizard document whose first step is an action, as flows::wizardSchemaJson<W>() emits it: what a wizard node naming that action builds its wizard from. Empty: a wizard node is reported and shown as a muted text.

Definition at line 121 of file document.hpp.


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