Epok Engine

EPOK RUNTIME

epok::UtilityLibrary::event_queue_emit

Method · 1 overload

Method

Performs `event queue emit` as part of the utility module.

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

Declaration

static
Declaration
static EventQueueMutation event_queue_emit(GameplayEventQueue4 state,uint32_t kind,int32_t value,ObjectId source)

Performs `event queue emit` as part of the utility module.

ParameterTypeMeaning
stateGameplayEventQueue4Value supplied for state. Keep referenced or pointed-to data valid for the complete call.
kinduint32_tValue supplied for kind. Keep referenced or pointed-to data valid for the complete call.
valueint32_tValue supplied for value. Keep referenced or pointed-to data valid for the complete call.
sourceObjectIdValue supplied for source. Keep referenced or pointed-to data valid for the complete call.

Returns: EventQueueMutation. 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:
// GameplayEventQueue4 state
// uint32_t kind
// int32_t value
// ObjectId source

auto result = epok::UtilityLibrary::event_queue_emit(state, kind, value, source);

Why use it

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.

Declared in runtime/utility.hpp:186

Related members