morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::author::BodyField< Action > Class Template Reference

One field of an action body: a member of the action, and the expression that fills it. More...

#include <author.hpp>

Public Member Functions

template<typename Member, typename V>
requires detail::Operand<V> && (detail::assignable<typename detail::ValueOf<V>::type, Member>())
 BodyField (Member Action::*member, V const &value)
 A field: a member pointer of the action, so a renamed field or another action's field is a compile error, and a value that can stand for the member's type.
std::string const & name () const noexcept
 The field's JSON name.
Json const & json () const noexcept
 The field's expression.

Detailed Description

template<typename Action>
class morph::ui::author::BodyField< Action >

One field of an action body: a member of the action, and the expression that fills it.

Template Parameters
ActionThe action.

Definition at line 1471 of file author.hpp.

Constructor & Destructor Documentation

◆ BodyField()

template<typename Action>
template<typename Member, typename V>
requires detail::Operand<V> && (detail::assignable<typename detail::ValueOf<V>::type, Member>())
morph::ui::author::BodyField< Action >::BodyField ( Member Action::* member,
V const & value )
inline

A field: a member pointer of the action, so a renamed field or another action's field is a compile error, and a value that can stand for the member's type.

Template Parameters
MemberThe member's type.
VThe value's C++ type: a handle or a constant.
Parameters
memberThe member.
valueThe value.

Definition at line 1481 of file author.hpp.

Member Function Documentation

◆ name()

template<typename Action>
std::string const & morph::ui::author::BodyField< Action >::name ( ) const
inlinenodiscardnoexcept

The field's JSON name.

Returns
The name.

Definition at line 1486 of file author.hpp.

◆ json()

template<typename Action>
Json const & morph::ui::author::BodyField< Action >::json ( ) const
inlinenodiscardnoexcept

The field's expression.

Returns
The JSON.

Definition at line 1490 of file author.hpp.


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