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

The Environment the evaluator reads through: a scope chain and the names bound at one place. More...

#include <interpreter.hpp>

Inheritance diagram for morph::ui::detail::ScopeEnv:
morph::ui::Environment

Public Member Functions

 ScopeEnv (RtScope const &scope, Bindings const *bindings, Value const *row=nullptr)
 Reads scope.
Value ref (std::string_view head, std::span< std::string const > path) const override
 Reads a name: a binding, then the scope chain.
Value row (std::span< std::string const > path) const override
 Reads the innermost row.
Value control (ExprKind form, std::string_view name) const override
 Reads a query or mutation form.
Value pref (std::string_view point, std::span< std::string const > path) const override
 Reads a customization choice.
Value client (ExprKind form, std::string_view name) const override
 Reads env, session or host.
FormatContext const & formatting () const override
 The session's formatting facts.
void report (std::string_view path, std::string_view reason) const override
 Reports to the screen's diagnostics.
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 the evaluator reads through: a scope chain and the names bound at one place.

Definition at line 1733 of file interpreter.hpp.

Constructor & Destructor Documentation

◆ ScopeEnv()

morph::ui::detail::ScopeEnv::ScopeEnv ( RtScope const & scope,
Bindings const * bindings,
Value const * row = nullptr )
inline

Reads scope.

Parameters
scopeThe scope.
bindingsThe names bound here; may be nullptr.
rowA row to read instead of the scope's (a table's key, evaluated before its row scope exists).

Definition at line 1739 of file interpreter.hpp.

Member Function Documentation

◆ ref()

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

Reads a name: a binding, then the scope chain.

Parameters
headThe name.
pathThe path after it.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 3421 of file interpreter.hpp.

◆ row()

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

Reads the innermost row.

Parameters
pathThe path.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 1751 of file interpreter.hpp.

◆ control()

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

Reads a query or mutation form.

Parameters
formThe form.
nameThe query or mutation.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 3479 of file interpreter.hpp.

◆ pref()

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

Reads a customization choice.

Parameters
pointThe point.
pathThe path.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 3520 of file interpreter.hpp.

◆ client()

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

Reads env, session or host.

Parameters
formThe form.
nameThe name.
Returns
The value.

Implements morph::ui::Environment.

Definition at line 3526 of file interpreter.hpp.

◆ formatting()

FormatContext const & morph::ui::detail::ScopeEnv::formatting ( ) const
inlinenodiscardoverridevirtual

The session's formatting facts.

Returns
They.

Implements morph::ui::Environment.

Definition at line 3530 of file interpreter.hpp.

◆ report()

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

Reports to the screen's diagnostics.

Parameters
pathThe expression's path.
reasonWhat went wrong.

Implements morph::ui::Environment.

Definition at line 3532 of file interpreter.hpp.


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