Epok Engine

EPOK RUNTIME

epok::instrument::valid_envelope

Function · 1 overload

Function

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

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

Declaration

Declaration
inline bool valid_envelope(const Envelope& e, bool volume)

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

ParameterTypeMeaning
econst Envelope &Value supplied for e. Keep referenced or pointed-to data valid for the complete call.
volumeboolValue supplied for volume. 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:
// const Envelope & e
// bool volume

auto result = epok::instrument::valid_envelope(e, volume);

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

Related members