src/Screens/SimulatorScreen.cpp
// pop all updates from all active simulations
pop all updates from all active simulations
pop all updates from all active simulations
void popAllSimulatorUpdates(osc::MainEditorState& impl) {
        for (auto& simulation : impl.simulations) {
            {
                auto& rr = simulation->regularReports;
                int popped = simulation->simulation->popRegularReports(rr);
                for (size_t i = rr.size() - static_cast<size_t>(popped); i < rr.size(); ++i) {
                    simulation->model->realizeReport(rr[i]->state);
                }
            }
            std::unique_ptr<Report> newSpotReport = simulation->simulation->tryPopLatestReport();
            if (newSpotReport) {
                simulation->spotReport = std::move(newSpotReport);
                simulation->model->realizeReport(simulation->spotReport->state);
            }
        }
    }
void popAllSimulatorUpdates ( osc :: MainEditorState & impl ) { for ( auto & simulation : impl . simulations ) { { auto & rr = simulation -> regularReports ; int popped = simulation -> simulation -> popRegularReports ( rr ) ; for ( size_t i = rr . size ( ) - static_cast < size_t > ( popped ) ; i < rr . size ( ) ; ++ i ) { simulation -> model -> realizeReport ( rr [ i ] -> state ) ; } } std :: unique_ptr < Report > newSpotReport = simulation -> simulation -> tryPopLatestReport ( ) ; if ( newSpotReport ) { simulation -> spotReport = std :: move ( newSpotReport ) ; simulation -> model -> realizeReport ( simulation -> spotReport -> state ) ; } } }
pop all updates from all active simulations
pop all updates from all active simulations
// pop regular reports // pop latest spot report