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

Provides a storage area for return values in JIT/ABI contexts. More...

#include <callback.hpp>

Public Types

using type = void
 

Public Member Functions

 ReturnSlot (type *data, size_t size) noexcept
 Construct from byte storage.
 
template<typename T >
requires std::is_trivially_copyable_v<T>
void Set (const T &value) noexcept
 Set the return value.
 
template<typename T >
requires std::is_trivially_copyable_v<T>
Get () const noexcept
 Get the return value.
 
template<typename T , typename... Args>
void Construct (Args &&... args) noexcept(noexcept(T(std::forward< Args >(args)...)))
 Construct an object in-place.
 

Detailed Description

Provides a storage area for return values in JIT/ABI contexts.

This class manages a memory region for return values, allowing safe reading, writing, and in-place construction of trivially copyable types. It is typically used to handle return values from dynamically generated functions.

Definition at line 221 of file callback.hpp.

Member Typedef Documentation

◆ type

using plugify::ReturnSlot::type = void

Definition at line 223 of file callback.hpp.

Constructor & Destructor Documentation

◆ ReturnSlot()

plugify::ReturnSlot::ReturnSlot ( type *  data,
size_t  size 
)
inlineexplicitnoexcept

Construct from byte storage.

Parameters
dataPointer to aligned byte storage
sizeSize in bytes

Definition at line 230 of file callback.hpp.

Member Function Documentation

◆ Construct()

template<typename T , typename... Args>
void plugify::ReturnSlot::Construct ( Args &&...  args)
inlinenoexcept

Construct an object in-place.

Template Parameters
TType to construct
ArgsConstructor argument types
Parameters
argsConstructor arguments

Definition at line 269 of file callback.hpp.

◆ Get()

template<typename T >
requires std::is_trivially_copyable_v<T>
T plugify::ReturnSlot::Get ( ) const
inlinenoexcept

Get the return value.

Template Parameters
TType of the return value
Returns
The return value

Definition at line 254 of file callback.hpp.

◆ Set()

template<typename T >
requires std::is_trivially_copyable_v<T>
void plugify::ReturnSlot::Set ( const T &  value)
inlinenoexcept

Set the return value.

Template Parameters
TType of the return value
Parameters
valueValue to return

Definition at line 242 of file callback.hpp.


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