plugify 1.2.8
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
plugify::Return Class Reference

Wrapper for function return values. More...

#include <call.hpp>

Public Types

using SlotType = uint64_t
 

Public Member Functions

template<typename T , typename... Args>
requires (sizeof(T) <= MaxSize && std::is_trivially_destructible_v<T>)
void Construct (Args &&... args) noexcept(noexcept(T(std::forward< Args >(args)...)))
 Construct an object of type T in the return storage.
 
template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>)
void Set (T value) noexcept
 Set the return value.
 
template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>)
Get () const noexcept
 Get the return value.
 
void Clear () noexcept
 Clear the return value storage.
 

Static Public Attributes

static constexpr size_t MaxSize = 2 * sizeof(SlotType)
 

Detailed Description

Wrapper for function return values.

Supports return values up to 128 bits (2 slots).

Definition at line 284 of file call.hpp.

Member Typedef Documentation

◆ SlotType

using plugify::Return::SlotType = uint64_t

Definition at line 286 of file call.hpp.

Member Function Documentation

◆ Clear()

void plugify::Return::Clear ( )
inlinenoexcept

Clear the return value storage.

Definition at line 328 of file call.hpp.

◆ Construct()

template<typename T , typename... Args>
requires (sizeof(T) <= MaxSize && std::is_trivially_destructible_v<T>)
void plugify::Return::Construct ( Args &&...  args)
inlinenoexcept

Construct an object of type T in the return storage.

Template Parameters
TType to construct.
Parameters
argsArguments to forward to the constructor.

Definition at line 296 of file call.hpp.

◆ Get()

template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>)
T plugify::Return::Get ( ) const
inlinenoexcept

Get the return value.

Template Parameters
TType of the return value.
Returns
The return value.

Definition at line 319 of file call.hpp.

◆ Set()

template<typename T >
requires (sizeof(T) <= MaxSize && std::is_trivially_copyable_v<T>)
void plugify::Return::Set ( value)
inlinenoexcept

Set the return value.

Template Parameters
TType of the return value.
Parameters
valueValue to set.

Definition at line 307 of file call.hpp.

Member Data Documentation

◆ MaxSize

constexpr size_t plugify::Return::MaxSize = 2 * sizeof(SlotType)
staticconstexpr

Definition at line 287 of file call.hpp.


The documentation for this class was generated from the following file: