CommonLibSSE NG
SKSE::Trampoline Class Reference

#include <Trampoline.h>

Public Types

using deleter_type = std::function< void(void *a_mem, std::size_t a_size)>
 

Public Member Functions

 Trampoline ()=default
 
 Trampoline (const Trampoline &)=delete
 
 Trampoline (Trampoline &&a_rhs) noexcept
 
 Trampoline (std::string_view a_name)
 
 ~Trampoline ()
 
Trampolineoperator= (const Trampoline &)=delete
 
Trampolineoperator= (Trampoline &&a_rhs) noexcept
 
void create (std::size_t a_size)
 
void create (std::size_t a_size, void *a_module)
 
void set_trampoline (void *a_trampoline, std::size_t a_size, deleter_type a_deleter={})
 
void * allocate (std::size_t a_size)
 
template<class T >
T * allocate ()
 
constexpr std::size_t empty () const noexcept
 
constexpr std::size_t capacity () const noexcept
 
constexpr std::size_t allocated_size () const noexcept
 
constexpr std::size_t free_size () const noexcept
 
template<std::size_t N>
std::uintptr_t write_branch (std::uintptr_t a_src, std::uintptr_t a_dst)
 
template<std::size_t N, class F >
std::uintptr_t write_branch (std::uintptr_t a_src, F a_dst)
 
template<std::size_t N>
std::uintptr_t write_call (std::uintptr_t a_src, std::uintptr_t a_dst)
 
template<std::size_t N, class F >
std::uintptr_t write_call (std::uintptr_t a_src, F a_dst)
 

Member Typedef Documentation

◆ deleter_type

using SKSE::Trampoline::deleter_type = std::function<void(void* a_mem, std::size_t a_size)>

Constructor & Destructor Documentation

◆ Trampoline() [1/4]

SKSE::Trampoline::Trampoline ( )
default

◆ Trampoline() [2/4]

SKSE::Trampoline::Trampoline ( const Trampoline )
delete

◆ Trampoline() [3/4]

SKSE::Trampoline::Trampoline ( Trampoline &&  a_rhs)
inlinenoexcept

◆ Trampoline() [4/4]

SKSE::Trampoline::Trampoline ( std::string_view  a_name)
inlineexplicit

◆ ~Trampoline()

SKSE::Trampoline::~Trampoline ( )
inline

Member Function Documentation

◆ allocate() [1/2]

template<class T >
T* SKSE::Trampoline::allocate ( )
inline

◆ allocate() [2/2]

void* SKSE::Trampoline::allocate ( std::size_t  a_size)
inline

◆ allocated_size()

constexpr std::size_t SKSE::Trampoline::allocated_size ( ) const
inlineconstexprnoexcept

◆ capacity()

constexpr std::size_t SKSE::Trampoline::capacity ( ) const
inlineconstexprnoexcept

◆ create() [1/2]

void SKSE::Trampoline::create ( std::size_t  a_size)
inline

◆ create() [2/2]

void SKSE::Trampoline::create ( std::size_t  a_size,
void *  a_module 
)

◆ empty()

constexpr std::size_t SKSE::Trampoline::empty ( ) const
inlineconstexprnoexcept

◆ free_size()

constexpr std::size_t SKSE::Trampoline::free_size ( ) const
inlineconstexprnoexcept

◆ operator=() [1/2]

Trampoline& SKSE::Trampoline::operator= ( const Trampoline )
delete

◆ operator=() [2/2]

Trampoline& SKSE::Trampoline::operator= ( Trampoline &&  a_rhs)
inlinenoexcept

◆ set_trampoline()

void SKSE::Trampoline::set_trampoline ( void *  a_trampoline,
std::size_t  a_size,
deleter_type  a_deleter = {} 
)
inline

◆ write_branch() [1/2]

template<std::size_t N, class F >
std::uintptr_t SKSE::Trampoline::write_branch ( std::uintptr_t  a_src,
a_dst 
)
inline

◆ write_branch() [2/2]

template<std::size_t N>
std::uintptr_t SKSE::Trampoline::write_branch ( std::uintptr_t  a_src,
std::uintptr_t  a_dst 
)
inline

◆ write_call() [1/2]

template<std::size_t N, class F >
std::uintptr_t SKSE::Trampoline::write_call ( std::uintptr_t  a_src,
a_dst 
)
inline

◆ write_call() [2/2]

template<std::size_t N>
std::uintptr_t SKSE::Trampoline::write_call ( std::uintptr_t  a_src,
std::uintptr_t  a_dst 
)
inline

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