This is the documentation for Enlighten.

class Geo RingBuffer ReadContext

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.

ReadContext(RingBuffer &)

Construct read context, waiting if data is not available.


Geo::RingBuffer::ReadContext::~ReadContext


public: ~ReadContext()


Destructor, releases data back to buffer.


void* Geo::RingBuffer::ReadContext::GetData


public: void * GetData() const


Get the data to read.


Geo::RingBuffer::ReadContext::ReadContext


public: ReadContext
(
    RingBuffer & buffer
)


Construct read context, waiting if data is not available.