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

What an expression's names resolve to, for checkExpression: the document's scopes implement it. More...

#include <expression.hpp>

Inheritance diagram for morph::ui::NameResolver:
morph::ui::PermissiveResolver morph::ui::detail::ScopeResolver

Public Member Functions

 NameResolver (NameResolver const &)=delete
NameResolver & operator= (NameResolver const &)=delete
 NameResolver (NameResolver &&)=delete
NameResolver & operator= (NameResolver &&)=delete
virtual std::expected< Type, std::string > ref (std::string_view head, std::span< std::string const > path) const =0
 Resolves {"ref": "head.path"}.
virtual std::expected< Type, std::string > row (std::span< std::string const > path) const =0
 Resolves {"row": "path"}.
virtual std::expected< Type, std::string > control (ExprKind form, std::string_view name) const =0
 Resolves the name of query, pending, error, result, errorKind or can.
virtual std::expected< Type, std::string > pref (std::string_view point, std::span< std::string const > path) const =0
 Resolves {"pref": "point.path"}.

Detailed Description

What an expression's names resolve to, for checkExpression: the document's scopes implement it.

Definition at line 682 of file expression.hpp.

Member Function Documentation

◆ ref()

virtual std::expected< Type, std::string > morph::ui::NameResolver::ref ( std::string_view head,
std::span< std::string const > path ) const
nodiscardpure virtual

Resolves {"ref": "head.path"}.

Parameters
headThe first segment.
pathThe segments after it.
Returns
The type read, or why the reference does not resolve.

Implemented in morph::ui::detail::ScopeResolver, and morph::ui::PermissiveResolver.

◆ row()

virtual std::expected< Type, std::string > morph::ui::NameResolver::row ( std::span< std::string const > path) const
nodiscardpure virtual

Resolves {"row": "path"}.

Parameters
pathThe field path inside the row.
Returns
The type read, or why there is no row here.

Implemented in morph::ui::detail::ScopeResolver, and morph::ui::PermissiveResolver.

◆ control()

virtual std::expected< Type, std::string > morph::ui::NameResolver::control ( ExprKind form,
std::string_view name ) const
nodiscardpure virtual

Resolves the name of query, pending, error, result, errorKind or can.

Parameters
formThe form.
nameThe query or mutation name.
Returns
The type read, or why the name does not resolve.

Implemented in morph::ui::detail::ScopeResolver, and morph::ui::PermissiveResolver.

◆ pref()

virtual std::expected< Type, std::string > morph::ui::NameResolver::pref ( std::string_view point,
std::span< std::string const > path ) const
nodiscardpure virtual

Resolves {"pref": "point.path"}.

Parameters
pointThe customization point.
pathThe segments after it.
Returns
The type read, or why the point is not declared.

Implemented in morph::ui::detail::ScopeResolver, and morph::ui::PermissiveResolver.


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