Epok Engine

EPOK RUNTIME

epok::timeline::poll_marker

Function · 1 overload

Function

Sorted tables use (tick, persistent marker ID) at cook time.

Belongs to
epok::timeline
Header
timeline.hpp
Overloads
1

Declaration

Declaration
inline bool poll_marker(const Marker* markers, uint16_t count, uint16_t& cursor, int32_t tick, uint16_t& id)

Sorted tables use (tick, persistent marker ID) at cook time.

ParameterTypeMeaning
markersconst Marker *Value supplied for markers. Keep referenced or pointed-to data valid for the complete call.
countuint16_tValue supplied for count. Keep referenced or pointed-to data valid for the complete call.
cursoruint16_t &Value supplied for cursor. Keep referenced or pointed-to data valid for the complete call.
tickint32_tValue supplied for tick. Keep referenced or pointed-to data valid for the complete call.
iduint16_t &Value supplied for id. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "timeline.hpp"

// Assume these named values have been initialized with valid data:
// const Marker * markers
// uint16_t count
// uint16_t & cursor
// int32_t tick
// uint16_t & id

auto result = epok::timeline::poll_marker(markers, count, cursor, tick, id);

Why use it

The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations. 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/timeline.hpp:57

Related members