Epok Engine

EPOK RUNTIME

epok::dispatch_trigger

Function · 1 overload

Function

Collision is owned by the spatial services, not by the Level: they resolve the legacy slot to its actor and call this, which fans the event out to the owner's components in registration order.

Belongs to
epok
Header
object_model.hpp
Overloads
1

Declaration

Declaration
inline size_t dispatch_trigger(Level& level, ObjectId actor, DataHandle other, TriggerPhase phase)

Collision is owned by the spatial services, not by the Level: they resolve the legacy slot to its actor and call this, which fans the event out to the owner's components in registration order.

ParameterTypeMeaning
levelLevel &Value supplied for level. Keep referenced or pointed-to data valid for the complete call.
actorObjectIdValue supplied for actor. Keep referenced or pointed-to data valid for the complete call.
otherDataHandleValue supplied for other. Keep referenced or pointed-to data valid for the complete call.
phaseTriggerPhaseValue supplied for phase. 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 "object_model.hpp"

// Assume these named values have been initialized with valid data:
// Level & level
// ObjectId actor
// DataHandle other
// TriggerPhase phase

auto result = epok::dispatch_trigger(level, actor, other, phase);

Why use it

It provides direct, allocation-conscious access to the object model module. 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/object_model.hpp:1238

Related members