[Pcloud]StimProducer: Impl addAttachedStimBuffIfNotExists
Reduces code duplication, centralizes checking and enforces consistent behaviour across producers. Also reordered the writes to the sh_ptr<StimulusBuffer>s such that the pointers are written last.
This commit is contained in:
@@ -76,6 +76,9 @@ public:
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>
|
||||
&deviceAttachmentSpec) = 0;
|
||||
|
||||
bool addAttachedStimulusBufferIfNotExists(
|
||||
const std::shared_ptr<StimulusBuffer>& buffer);
|
||||
|
||||
virtual void destroyAttachedStimulusBuffer(
|
||||
const std::shared_ptr<StimulusBuffer>& buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user