Epok Engine

EPOK RUNTIME

epok::descendant

Function · 1 overload

Function

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

Belongs to
epok
Header
lifecycle.hpp
Overloads
1

Declaration

Declaration
inline bool descendant(size_t child,size_t ancestor)

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

ParameterTypeMeaning
childsize_tValue supplied for child. Keep referenced or pointed-to data valid for the complete call.
ancestorsize_tValue supplied for ancestor. 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 "lifecycle.hpp"

// Assume these named values have been initialized with valid data:
// size_t child
// size_t ancestor

auto result = epok::descendant(child, ancestor);

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

Related members