Epok Engine

EPOK RUNTIME

epok::next_generation

Function · 1 overload

Function

Performs `next generation` as part of entity creation, activation and destruction.

Belongs to
epok
Header
lifecycle.hpp
Overloads
1

Declaration

Declaration
inline uint32_t next_generation(uint32_t n)

Performs `next generation` as part of entity creation, activation and destruction.

ParameterTypeMeaning
nuint32_tValue supplied for n. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "lifecycle.hpp"

// Assume these named values have been initialized with valid data:
// uint32_t n

auto result = epok::next_generation(n);

Why use it

It provides direct, allocation-conscious access to entity creation, activation and destruction. No exception-based error path is implied by the signature.

Trade-offs and warnings

Call it only in the lifecycle phase described by the module. Validate indices, capacities and object state before use.

Declared in runtime/lifecycle.hpp:20

Related members