Epok Engine

EPOK RUNTIME

epok::attach_component

Function · 1 overload

Function

Spatial attachment between components of the same domain.

Belongs to
epok
Header
object_model.hpp
Overloads
1

Declaration

Declaration
inline bool attach_component(ObjectId child, ObjectId parent)

Spatial attachment between components of the same domain.

ParameterTypeMeaning
childObjectIdValue supplied for child. 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: bool. 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:
// ObjectId child
// ObjectId parent

auto result = epok::attach_component(child, parent);

Why use it

The boolean result makes success, availability or state explicit without exceptions.

Trade-offs and warnings

Check the return value; `false` is part of normal control flow for many PSX resource operations.

Declared in runtime/object_model.hpp:1264

Related members