Epok Engine

EPOK RUNTIME

epok::EventQueue::snapshot

Method · 1 overload

Method

Performs `snapshot` as part of the utility module.

Belongs to
epok::EventQueue
Header
utility.hpp
Overloads
1

Declaration

const
Declaration
size_t snapshot(QueueEvent* output,size_t capacity)const

Performs `snapshot` as part of the utility module.

ParameterTypeMeaning
outputQueueEvent *Value supplied for output. Keep referenced or pointed-to data valid for the complete call.
capacitysize_tValue supplied for capacity. Keep referenced or pointed-to data valid for the complete call.

Returns: size_t. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "utility.hpp"

// Assume these named values have been initialized with valid data:
// QueueEvent * output
// size_t capacity

epok::EventQueue& object = /* obtain a valid instance */;

auto result = object.snapshot(output, capacity);

Why use it

The method is `const`, so it does not mutate the object through this API surface. The asynchronous shape lets the frame loop continue while hardware or queued work completes.

Trade-offs and warnings

Captured data and buffers must remain valid until the callback or task has completed. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in runtime/utility.hpp:109

Related members