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

◆ save_state()

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

Saves the node's current state for later restoration Recursively cascades through all connected modulator nodes Protected - only NodeSourceProcessor and NodeBuffer can call.

Implements MayaFlux::Nodes::Node.

Definition at line 839 of file Logic.cpp.

840{
848
849 if (m_coef_bound)
851
852 if (m_input_node)
853 m_input_node->save_state();
854
855 for (const auto& node : m_input_nodes)
856 node->save_state();
857
858 m_state_saved = true;
859}
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
void save_state() override
Saves the node's current state for later restoration Recursively cascades through all connected modul...
Definition Logic.cpp:839
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
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.