Epok Engine

EPOK RUNTIME

epok::instrument::valid_source

Function · 1 overload

Function

Performs `valid source` as part of the instrument bank module.

Belongs to
epok::instrument
Header
instrument_bank.hpp
Overloads
1

Declaration

Declaration
inline bool valid_source(uint16_t bits)

Performs `valid source` as part of the instrument bank module.

ParameterTypeMeaning
bitsuint16_tValue supplied for bits. 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 "instrument_bank.hpp"

// Assume these named values have been initialized with valid data:
// uint16_t bits

auto result = epok::instrument::valid_source(bits);

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/instrument_bank.hpp:49

Related members