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

◆ attach()

template<typename T>
bool MayaFlux::Portal::Forma::InteractionTable< T >::attach ( Geometry::Form< T > & form,
std::string_view name,
std::optional< Kinesis::AABB2D > placement,
std::string & error ) const
inline

Resolve a name onto a Form's interaction.

An empty name leaves the Form as it is and succeeds, so an input that does not name an interaction needs no check by the caller.

Parameters
placementBounds the provider may use, when the placement has any.
errorReceives the reason when false is returned.

Definition at line 88 of file Interaction.hpp.

90 {
91 if (name.empty())
92 return true;
93 const auto interaction = resolve(name, InteractionSource { .placement = placement }, error);
94 if (!interaction)
95 return false;
96 form.wire = *interaction;
97 return true;
98 }
std::optional< InteractionFn< T > > resolve(std::string_view name, const InteractionSource &source, std::string &error) const
Run the provider of this name on a source.
Interaction providers for one state type, by name.

References resolve(), and MayaFlux::Portal::Forma::Geometry::Form< T >::wire.

Here is the call graph for this function: