Epok Engine

EPOK RUNTIME

epok::allocate_actor_data

Function · 1 overload

Function

Performs `allocate actor data` as part of the epok module.

Belongs to
epok
Header
epok.hpp
Overloads
1

Declaration

Declaration
ActorData* allocate_actor_data(const char* name,ActorData* parent=nullptr)

Performs `allocate actor data` as part of the epok module.

ParameterTypeMeaning
nameconst char *Value supplied for name. Keep referenced or pointed-to data valid for the complete call.
parentActorData *Value supplied for parent. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "epok.hpp"

// Assume these named values have been initialized with valid data:
// const char * name
// ActorData * parent

auto result = epok::allocate_actor_data(name, parent);

Why use it

It provides direct, allocation-conscious access to the epok 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/epok.hpp:182

Related members