This is the documentation for Enlighten.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

class Geo::RingBuffer::WriteContext

Write context type, which allows efficient and safe writing.

To write data: 1) Construct WriteContext with the desired size and alignment. This reserves space in the buffer. 2) Write data to the pointer returned by GetAllocation(). 3) Destroy WriteContext. This commits the write, allowing it to be read by the consumer.

Functions

Name Description
~WriteContext()

Destructor, commits data to buffer.

GetAllocation()

Get the pointer to the data to be written.

WriteContext(RingBuffer &, u32, u32)

Construct write context, reserving space in the buffer.


Geo::RingBuffer::WriteContext::~WriteContext


public: ~WriteContext()


Destructor, commits data to buffer.


void* Geo::RingBuffer::WriteContext::GetAllocation


public: void * GetAllocation() const


Get the pointer to the data to be written.


Geo::RingBuffer::WriteContext::WriteContext


public: WriteContext
(
    RingBuffer & buffer,
    u32 size,
    u32 alignment
)


Construct write context, reserving space in the buffer.

  • No labels