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

◆ set_named()

template<ControlSlot Slot>
bool MayaFlux::ControlValueStore< Slot >::set_named ( std::string_view name,
double value )
inline

Sets the member called name to the number value.

Returns
False when no member has that name.

The same as set() with that one member, so it applies at the next block. A member that holds a vector is left alone, so a number cannot retype it.

Definition at line 144 of file ControlValueStore.hpp.

146 {
147 for (const Entry& entry : m_slots) {
148 if (entry.name == name) {
149 if (entry.slot->width() > 1) {
150 return false;
151 }
152 entry.slot->assign(Slot(value));
153 return true;
154 }
155 }
156 return false;
157 }
Owns one described struct of Slot members for a host such as a network, an operator or an input node.