morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::detail::host::ParamsEnv Class Referencefinal

The environment identityOf evaluates in: the params, and nothing else. Reading anything else marks it unknown. More...

#include <host.hpp>

Inheritance diagram for morph::ui::detail::host::ParamsEnv:
morph::ui::Environment

Public Member Functions

 ParamsEnv (ParamMap const &params)
 An environment over params.
Value ref (std::string_view head, std::span< std::string const > path) const override
 Reads {"ref": "head.path"}.
Value row (std::span< std::string const > path) const override
 Reads {"row": "path"}.
Value control (ExprKind form, std::string_view name) const override
 Reads query, pending, error, result, errorKind or can.
Value pref (std::string_view point, std::span< std::string const > path) const override
 Reads {"pref": "point.path"}.
Value client (ExprKind form, std::string_view name) const override
 Reads env, session or host.
FormatContext const & formatting () const override
 The formatting facts.
void report (std::string_view path, std::string_view reason) const override
 Reports a runtime error of an expression.
bool unknown () const noexcept
 Whether the evaluation read anything but the params, or failed.
Public Member Functions inherited from morph::ui::Environment
 Environment (Environment const &)=delete
Environment & operator= (Environment const &)=delete
 Environment (Environment &&)=delete
Environment & operator= (Environment &&)=delete

Detailed Description

The environment identityOf evaluates in: the params, and nothing else. Reading anything else marks it unknown.

Definition at line 236 of file host.hpp.

Constructor & Destructor Documentation

◆ ParamsEnv()

morph::ui::detail::host::ParamsEnv::ParamsEnv ( ParamMap const & params)
inlineexplicit

An environment over params.

Parameters
paramsThe params; borrowed for the environment's lifetime.

Definition at line 240 of file host.hpp.

Member Function Documentation

◆ ref()

Value morph::ui::detail::host::ParamsEnv::ref ( std::string_view head,
std::span< std::string const > path ) const
inlinenodiscardoverridevirtual

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

Parameters
headThe first segment.
pathThe segments after it.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 242 of file host.hpp.

◆ row()

Value morph::ui::detail::host::ParamsEnv::row ( std::span< std::string const > path) const
inlinenodiscardoverridevirtual

Reads {"row": "path"}.

Parameters
pathThe field path inside the innermost row.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 259 of file host.hpp.

◆ control()

Value morph::ui::detail::host::ParamsEnv::control ( ExprKind form,
std::string_view name ) const
inlinenodiscardoverridevirtual

Reads query, pending, error, result, errorKind or can.

Parameters
formThe form.
nameThe query or mutation.
Returns
The value: a bool for pending and can.

Implements morph::ui::Environment.

Definition at line 261 of file host.hpp.

◆ pref()

Value morph::ui::detail::host::ParamsEnv::pref ( std::string_view point,
std::span< std::string const > path ) const
inlinenodiscardoverridevirtual

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

Parameters
pointThe customization point.
pathThe segments after it.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 268 of file host.hpp.

◆ client()

Value morph::ui::detail::host::ParamsEnv::client ( ExprKind form,
std::string_view name ) const
inlinenodiscardoverridevirtual

Reads env, session or host.

Parameters
formThe form.
nameThe name read.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 273 of file host.hpp.

◆ formatting()

FormatContext const & morph::ui::detail::host::ParamsEnv::formatting ( ) const
inlinenodiscardoverridevirtual

The formatting facts.

Returns
The context the display functions and t use.

Implements morph::ui::Environment.

Definition at line 280 of file host.hpp.

◆ report()

void morph::ui::detail::host::ParamsEnv::report ( std::string_view path,
std::string_view reason ) const
inlineoverridevirtual

Reports a runtime error of an expression.

Parameters
pathThe JSON Pointer of the expression node that failed.
reasonWhat went wrong.

Implements morph::ui::Environment.

Definition at line 283 of file host.hpp.

◆ unknown()

bool morph::ui::detail::host::ParamsEnv::unknown ( ) const
inlinenodiscardnoexcept

Whether the evaluation read anything but the params, or failed.

Returns
It.

Definition at line 291 of file host.hpp.


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