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

◆ pending()

template<typename T = double>
requires is_value<T>
std::optional< T > MayaFlux::Nodes::Network::Control::pending ( )
inlinenodiscardnoexcept

The value to apply now as type T, or nullopt when nothing is due.

A value is returned once per change, a node source every call. A network source is per element and is never returned here; read it with at(). A control set with another type than T returns nothing.

Definition at line 94 of file Control.hpp.

95 {
96 if (m_network) {
97 return std::nullopt;
98 }
99 if (m_node) {
100 if (!has_value() || width() != width_of<T>()) {
101 return std::nullopt;
102 }
103 return value<T>();
104 }
106 }
bool has_value() const noexcept
True once a value was given.
static constexpr uint8_t width_of() noexcept
double value() const noexcept
The value as a double.
size_t width() const noexcept
Components held: 0 when empty, 1 for a number, flag or enum, 2 to 4 for a vector, 6 for a box.
std::optional< T > pending() noexcept
The value to apply now as type T, or nullopt when nothing is due.
std::shared_ptr< Node > m_node
Definition Control.hpp:142
std::shared_ptr< NodeNetwork > m_network
Definition Control.hpp:143

References MayaFlux::ControlValue::has_value(), m_network, m_node, MayaFlux::ControlValue::pending(), MayaFlux::ControlValue::value(), MayaFlux::ControlValue::width(), and MayaFlux::ControlValue::width_of().

Referenced by MayaFlux::Nodes::Network::GpuFieldOperator::apply_controls(), MayaFlux::Nodes::Network::ModalDampingOperator::apply_controls(), MayaFlux::Nodes::Network::PhysicsOperator::apply_controls(), and MayaFlux::Nodes::Network::ReedOperator::apply_controls().

Here is the call graph for this function:
Here is the caller graph for this function: