Epok Engine

EPOK RUNTIME

epok::entity_index

Function · 1 overload

Function

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

Belongs to
epok
Header
lifecycle.hpp
Overloads
1

Declaration

Declaration
inline int entity_index(const ActorData* entity)

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

ParameterTypeMeaning
entityconst ActorData *Value supplied for entity. Keep referenced or pointed-to data valid for the complete call.

Returns: int. 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:
// const ActorData * entity

auto result = epok::entity_index(entity);

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

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/lifecycle.hpp:9

Related members