class Geo::RingBuffer::ReadContext
Write context type, which allows efficient and safe reading.
To read data: 1) Construct ReadContext. This spin-waits for data to be available if it is not already (see also HasData()). 2) Read data from the pointer returned by GetData(). 3) Destroy ReadContext. This released the data back to the buffer, allowing it to be overwritten by the producer.
Functions
Name | Description |
---|---|
~ReadContext() | Destructor, releases data back to buffer. |
GetData() | Get the data to read. |
NonCopyable(NonCopyable &&) | Defaulted to allow move. |
operator=(NonCopyable &&) | Defaulted to allow move. |
ReadContext(RingBuffer &) | Construct read context, waiting if data is not available. |
Anchor | ||||
---|---|---|---|---|
|
Geo::RingBuffer::ReadContext::~ReadContext
...
public: ~ReadContext()
...
Destructor, releases data back to buffer.
Anchor | ||||
---|---|---|---|---|
|
void* Geo::RingBuffer::ReadContext::GetData
...
public: void * GetData() const
...
Get the data to read.
Anchor | ||||
---|---|---|---|---|
|
Geo::NonCopyable::NonCopyable
...
public: NonCopyable
(
NonCopyable &&
)
...
Defaulted to allow move.
Anchor | ||||
---|---|---|---|---|
|
NonCopyable& Geo::NonCopyable::operator=
...
public: NonCopyable & operator=
(
NonCopyable &&
)
...
Defaulted to allow move.
Anchor | ||||
---|---|---|---|---|
|
Geo::RingBuffer::ReadContext::ReadContext
...
public: ReadContext
(
RingBuffer & buffer
)
...
Construct read context, waiting if data is not available.