StimProducer: add destroyAttachedStimulusBuffer virtual method
Implemented in base class and in derived class PcloudStimulusProducer.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <config.h>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <algorithm>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/deadline_timer.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
@@ -51,6 +52,21 @@ bool StimulusProducer::hasBufferWithQualeIfaceApi(
|
||||
return false;
|
||||
}
|
||||
|
||||
void StimulusProducer::destroyAttachedStimulusBuffer(
|
||||
const std::shared_ptr<StimulusBuffer>& buffer)
|
||||
{
|
||||
if (!buffer) { return; }
|
||||
|
||||
auto it = std::find(
|
||||
attachedStimulusBuffers.begin(),
|
||||
attachedStimulusBuffers.end(),
|
||||
buffer);
|
||||
|
||||
if (it != attachedStimulusBuffers.end()) {
|
||||
attachedStimulusBuffers.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
void StimulusProducer::stop()
|
||||
{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user