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

Provides access to a span of parameters stored in register-sized slots. More...

#include <callback.hpp>

Public Types

using slot_type = uint64_t
 

Public Member Functions

 ParametersSpan (slot_type *data, size_t count) noexcept
 Constructs a ParametersSpan.
 
template<typename T >
requires SlotStorable<T>
Get (size_t index) const noexcept
 Get a value from the parameter span.
 
template<typename T >
requires SlotStorable<T>
void Set (size_t index, const T &value) noexcept
 Set a value in the parameter span.
 

Detailed Description

Provides access to a span of parameters stored in register-sized slots.

This class allows reading and writing values of trivially copyable types to a contiguous array of register-sized slots, typically used for passing function arguments in JIT or ABI contexts.

Definition at line 166 of file callback.hpp.

Member Typedef Documentation

◆ slot_type

using plugify::ParametersSpan::slot_type = uint64_t

Definition at line 168 of file callback.hpp.

Constructor & Destructor Documentation

◆ ParametersSpan()

plugify::ParametersSpan::ParametersSpan ( slot_type *  data,
size_t  count 
)
inlinenoexcept

Constructs a ParametersSpan.

Parameters
dataPointer to the slot data.
countNumber of slots.

Definition at line 175 of file callback.hpp.

Member Function Documentation

◆ Get()

template<typename T >
requires SlotStorable<T>
T plugify::ParametersSpan::Get ( size_t  index) const
inlinenoexcept

Get a value from the parameter span.

Template Parameters
TType to interpret the parameter as
Parameters
indexParameter index
Returns
The value at the specified index

Definition at line 188 of file callback.hpp.

◆ Set()

template<typename T >
requires SlotStorable<T>
void plugify::ParametersSpan::Set ( size_t  index,
const T &  value 
)
inlinenoexcept

Set a value in the parameter span.

Template Parameters
TType of the value to set
Parameters
indexParameter index
valueValue to set

Definition at line 203 of file callback.hpp.


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