47 explicit BufferGuard(std::shared_ptr<core::Buffer> buffer);
80 std::shared_ptr<core::Buffer> m_buffer;
93 : m_buffer(std::move(buffer))
95 if (m_buffer ==
nullptr)
107 m_buffer->ParentDataStream()->QueueBuffer(m_buffer);
121 return m_buffer.get();
BufferGuard & operator=(BufferGuard &&other) noexcept=default
BufferGuard(BufferGuard &&other) noexcept=default
PEAK_COMMON_NO_DISCARD core::Buffer * operator->() const
Returns the guarded buffer.
Definition peak_buffer_guard.hpp:119
~BufferGuard()
Requeues the guarded buffer.
Definition peak_buffer_guard.hpp:101
PEAK_COMMON_NO_DISCARD std::shared_ptr< core::Buffer > Buffer() const
Returns the guarded buffer.
Definition peak_buffer_guard.hpp:114
BufferGuard(std::shared_ptr< core::Buffer > buffer)
Creates a buffer guard for the given buffer.
Definition peak_buffer_guard.hpp:92
BufferGuard & operator=(const BufferGuard &other)=delete
BufferGuard(const BufferGuard &other)=delete
Represents a GenTL buffer module.
Definition peak_buffer.hpp:85
The exception thrown for passing an invalid argument to a function.
Definition peak_exception.hpp:118
The "core" namespace contains the direct GenAPI and GenTL wrapper.
Definition peak_buffer.hpp:32
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_buffer.hpp:29
#define PEAK_COMMON_NO_DISCARD
Definition peak_common_defines.h:89