morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::model::ActionKeyTraits< Action > Struct Template Reference

Declares where an action's model key comes from. More...

#include <model_key.hpp>

Static Public Attributes

static constexpr bool hasKey = false
 Whether this action carries or establishes its model's key.
static constexpr bool fromResult = false
 Whether the key comes from the action's result rather than its payload.

Detailed Description

template<typename Action>
struct morph::model::ActionKeyTraits< Action >

Declares where an action's model key comes from.

The primary template is the keyless case, which is the default and the common one: such an action says nothing about identity and runs against whichever instance its handler is already attached to. Specialise via BRIDGE_KEY_FROM or BRIDGE_KEY_FROM_RESULT rather than by hand.

Template Parameters
ActionConcrete action type.

Definition at line 218 of file model_key.hpp.

Member Data Documentation

◆ hasKey

template<typename Action>
bool morph::model::ActionKeyTraits< Action >::hasKey = false
staticconstexpr

Whether this action carries or establishes its model's key.

Definition at line 220 of file model_key.hpp.

◆ fromResult

template<typename Action>
bool morph::model::ActionKeyTraits< Action >::fromResult = false
staticconstexpr

Whether the key comes from the action's result rather than its payload.

Definition at line 223 of file model_key.hpp.


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