OSVR-Core
|
A class providing access to an entry in the ring buffer, holding a sharable mutex lock preventing it from being overwritten while this object is in scope. More...
#include <IPCRingBuffer.h>
Public Member Functions | |
operator bool () const | |
Checks validity of pointer - was the specified buffer entry available? | |
pointer_to_const_type | get () const |
Gets the raw pointer. | |
smart_pointer_type | getBufferSmartPointer () const |
Gets a smart pointer to the buffer that shares ownership of the underlying resources of this object. More... | |
sequence_type | getSequenceNumber () const |
Gets the sequence number associated with this entry. | |
pointer_to_const_type | operator* () const |
pointer_to_const_type | operator-> () const |
Friends | |
class | IPCRingBuffer |
A class providing access to an entry in the ring buffer, holding a sharable mutex lock preventing it from being overwritten while this object is in scope.
As such, you should only access the memory pointed to by this object while you keep this object alive, and you should let it go out of scope when you no longer need the data.
This object acts somewhat like a smart pointer.
IPCRingBuffer::smart_pointer_type osvr::common::IPCRingBuffer::BufferReadProxy::getBufferSmartPointer | ( | ) | const |
Gets a smart pointer to the buffer that shares ownership of the underlying resources of this object.