MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ expose_typed()

template<typename Source, typename Access = Reflect::RecordAccess<Source>>
template<Reflect::Described Input>
void MayaFlux::Portal::Forma::ActionTable< Source, Access >::expose_typed ( std::string name,
Reflect::RecordBinding< Input, Source, Access > binding,
std::type_identity_t< std::function< Action(const Input &)> > make )
inline

Register an action whose parameters are a described type.

The attributes of the on element, other than event, button and action, are decoded strictly into Input, and make builds the action from it.

Parameters
bindingBinding for Input, configured with any required names.
makeCallable taking the decoded Input and returning the Action.

Definition at line 100 of file ActionTable.hpp.

102 {
104 m_makers.insert_or_assign(name,
107 uint64_t where {};
108 const auto input = binding.read(on, error, &where);
109 if (!input) {
111 return std::nullopt;
112 }
113 return make(*input);
114 });
115 }
Actions by name, which a document attaches to events and never defines.
std::string located_message(uint64_t location, std::string_view message)
A diagnostic message prefixed with the location of the element it concerns.