Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

NameDescription
~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.


Anchor
aae7f6a19a56cd66dc0704b1fdac46cba
aae7f6a19a56cd66dc0704b1fdac46cba

Geo::RingBuffer::WriteContext::~WriteContext

...

public: ~WriteContext()

...

Destructor, commits data to buffer.


Anchor
af34f8a5ac3d304cae9ce8fe7c8c99f0a
af34f8a5ac3d304cae9ce8fe7c8c99f0a

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

...

public: void * GetAllocation() const

...

Get the pointer to the data to be written.


Anchor
a331febba4edc00bdbef9df11f2744cbe
a331febba4edc00bdbef9df11f2744cbe

Geo::RingBuffer::WriteContext::WriteContext

...

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

...

Construct write context, reserving space in the buffer.