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

◆ restore_state()

void MayaFlux::Nodes::Generator::Logic::restore_state ( )
overridevirtual

Restores the node's state from the last save Recursively cascades through all connected modulator nodes Protected - only NodeSourceProcessor and NodeBuffer can call.

Implements MayaFlux::Nodes::Node.

Definition at line 861 of file Logic.cpp.

862{
870
871 if (m_coef_bound && !m_saved_coefficients.empty())
873
874 if (m_input_node)
875 m_input_node->restore_state();
876
877 for (const auto& node : m_input_nodes)
878 node->restore_state();
879
880 m_state_saved = false;
881}
std::vector< uint8_t > m_saved_history_ring
Definition Logic.hpp:764
std::vector< std::shared_ptr< Node > > m_input_nodes
Nodes feeding the input slots in parallel input mode.
Definition Logic.hpp:714
double m_temporal_time
Time tracking for temporal mode.
Definition Logic.hpp:710
std::vector< double > m_coefficients
Coefficient array handed to coefficient-aware functions.
Definition Logic.hpp:718
bool m_coef_bound
True while the active mode runs a coefficient function.
Definition Logic.hpp:723
std::shared_ptr< Node > m_input_node
Input node for processing.
Definition Logic.hpp:713
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:708
std::vector< uint8_t > m_history_ring
Ring buffer for history storage.
Definition Logic.hpp:716
bool m_hysteresis_state
State for hysteresis operator.
Definition Logic.hpp:709
size_t m_history_count
Number of valid entries in the history buffer.
Definition Logic.hpp:701
size_t m_history_head
Head index for the history ring buffer.
Definition Logic.hpp:700
std::vector< double > m_saved_coefficients
Saved coefficient array, used when a coefficient function is bound.
Definition Logic.hpp:719
void restore_state() override
Restores the node's state from the last save Recursively cascades through all connected modulator nod...
Definition Logic.cpp:861
bool m_state_saved
tracks if the node's state has been saved by a snapshot operation
Definition Node.hpp:498
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:441

References m_coef_bound, m_coefficients, m_edge_detected, m_history_count, m_history_head, m_history_ring, m_hysteresis_state, m_input_node, m_input_nodes, MayaFlux::Nodes::Node::m_last_output, m_saved_coefficients, m_saved_edge_detected, m_saved_history_count, m_saved_history_head, m_saved_history_ring, m_saved_hysteresis_state, m_saved_last_output, m_saved_temporal_time, MayaFlux::Nodes::Node::m_state_saved, and m_temporal_time.