Epok Engine

EPOK RUNTIME

epok::bp::api::spawn

Function · 1 overload

Function

Performs `spawn` as part of compiled Blueprint execution and object interaction.

Belongs to
epok::bp::api
Header
blueprint_api.hpp
Overloads
1

Declaration

Declaration
inline ObjectId spawn(ClassId type,ObjectId parent)

Performs `spawn` as part of compiled Blueprint execution and object interaction.

ParameterTypeMeaning
typeClassIdValue supplied for type. Keep referenced or pointed-to data valid for the complete call.
parentObjectIdValue supplied for parent. Keep referenced or pointed-to data valid for the complete call.

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

Example

C++ example
#include "blueprint_api.hpp"

// Assume these named values have been initialized with valid data:
// ClassId type
// ObjectId parent

auto result = epok::bp::api::spawn(type, parent);

Why use it

It provides direct, allocation-conscious access to compiled Blueprint execution and object interaction. 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/blueprint_api.hpp:71

Related members