morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::author::InstanceSpec Class Reference

A model alias's instance: a binding mode, a key expression, or a borrowed binding. More...

#include <author.hpp>

Public Member Functions

 InstanceSpec ()=default
 The default binding.
 InstanceSpec (Instance mode)
 A binding mode.
 InstanceSpec (Borrow borrow)
 A borrowed binding.
template<typename T>
 InstanceSpec (Handle< T > const &key)
 A key expression: the shared instance the key selects. The model must be keyed.
std::optional< Json > json () const
 The instance JSON.

Detailed Description

A model alias's instance: a binding mode, a key expression, or a borrowed binding.

Definition at line 1559 of file author.hpp.

Constructor & Destructor Documentation

◆ InstanceSpec() [1/3]

morph::ui::author::InstanceSpec::InstanceSpec ( Instance mode)
inline

A binding mode.

Parameters
modeThe mode.

Definition at line 1566 of file author.hpp.

◆ InstanceSpec() [2/3]

morph::ui::author::InstanceSpec::InstanceSpec ( Borrow borrow)
inline

A borrowed binding.

Parameters
borrowThe opener's alias.

Definition at line 1571 of file author.hpp.

◆ InstanceSpec() [3/3]

template<typename T>
morph::ui::author::InstanceSpec::InstanceSpec ( Handle< T > const & key)
inline

A key expression: the shared instance the key selects. The model must be keyed.

Template Parameters
TThe key's value type.
Parameters
keyThe key.

Definition at line 1578 of file author.hpp.

Member Function Documentation

◆ json()

std::optional< Json > morph::ui::author::InstanceSpec::json ( ) const
inlinenodiscard

The instance JSON.

Returns
The JSON, or nothing for the default.

Definition at line 1583 of file author.hpp.


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