CommonLibSSE (powerof3)
REL::Relocation< T > Class Template Reference

#include <Relocation.h>

Public Types

using value_type = std::conditional_t< std::is_member_pointer_v< T >||std::is_function_v< std::remove_pointer_t< T > >, std::decay_t< T >, T >
 

Public Member Functions

constexpr Relocation () noexcept=default
 
constexpr Relocation (std::uintptr_t a_address) noexcept
 
 Relocation (Offset a_offset)
 
 Relocation (ID a_id)
 
 Relocation (ID a_id, std::ptrdiff_t a_offset)
 
constexpr Relocationoperator= (std::uintptr_t a_address) noexcept
 
Relocationoperator= (Offset a_offset)
 
Relocationoperator= (ID a_id)
 
template<class U = value_type>
decltype(auto) operator* () const noexcept requires(std
 
template<class U = value_type>
auto operator-> () const noexcept requires(std
 
template<class... Args>
std::invoke_result_t< const value_type &, Args... > operator() (Args &&... a_args) const noexcept(std::is_nothrow_invocable_v< const value_type &, Args... >) requires(std
 
constexpr std::uintptr_t address () const noexcept
 
std::size_t offset () const
 
value_type get () const noexcept(std::is_nothrow_copy_constructible_v< value_type >)
 
template<std::ptrdiff_t O = 0>
void replace_func (const std::size_t a_count, const std::uintptr_t a_dst) requires(std
 
template<std::ptrdiff_t O = 0, class F >
void replace_func (const std::size_t a_count, const F a_dst) requires(std
 
template<std::integral U>
void write (const U &a_data) requires(std
 
template<class U >
void write (const std::span< U > a_data) requires(std
 
template<std::size_t N>
std::uintptr_t write_branch (const std::uintptr_t a_dst) requires(std
 
template<std::size_t N, class F >
std::uintptr_t write_branch (const F a_dst) requires(std
 
template<std::size_t N>
std::uintptr_t write_call (const std::uintptr_t a_dst) requires(std
 
template<std::size_t N, class F >
std::uintptr_t write_call (const F a_dst) requires(std
 
void write_fill (const std::uint8_t a_value, const std::size_t a_count) requires(std
 
template<class U = value_type>
std::uintptr_t write_vfunc (const std::size_t a_idx, const std::uintptr_t a_newFunc) requires(std
 
template<class F >
std::uintptr_t write_vfunc (const std::size_t a_idx, const F a_newFunc) requires(std
 

Member Typedef Documentation

◆ value_type

template<class T = std::uintptr_t>
using REL::Relocation< T >::value_type = std::conditional_t< std::is_member_pointer_v<T> || std::is_function_v<std::remove_pointer_t<T> >, std::decay_t<T>, T>

Constructor & Destructor Documentation

◆ Relocation() [1/5]

template<class T = std::uintptr_t>
constexpr REL::Relocation< T >::Relocation ( )
constexprdefaultnoexcept

◆ Relocation() [2/5]

template<class T = std::uintptr_t>
constexpr REL::Relocation< T >::Relocation ( std::uintptr_t  a_address)
inlineexplicitconstexprnoexcept

◆ Relocation() [3/5]

template<class T = std::uintptr_t>
REL::Relocation< T >::Relocation ( Offset  a_offset)
inlineexplicit

◆ Relocation() [4/5]

template<class T = std::uintptr_t>
REL::Relocation< T >::Relocation ( ID  a_id)
inlineexplicit

◆ Relocation() [5/5]

template<class T = std::uintptr_t>
REL::Relocation< T >::Relocation ( ID  a_id,
std::ptrdiff_t  a_offset 
)
inlineexplicit

Member Function Documentation

◆ address()

template<class T = std::uintptr_t>
constexpr std::uintptr_t REL::Relocation< T >::address ( ) const
inlineconstexprnoexcept

◆ get()

template<class T = std::uintptr_t>
value_type REL::Relocation< T >::get ( ) const
inlinenoexcept

◆ offset()

template<class T = std::uintptr_t>
std::size_t REL::Relocation< T >::offset ( ) const
inline

◆ operator()()

template<class T = std::uintptr_t>
template<class... Args>
std::invoke_result_t<const value_type&, Args...> REL::Relocation< T >::operator() ( Args &&...  a_args) const
inlinenoexcept

◆ operator*()

template<class T = std::uintptr_t>
template<class U = value_type>
decltype(auto) REL::Relocation< T >::operator* ( ) const
inlinenoexcept

◆ operator->()

template<class T = std::uintptr_t>
template<class U = value_type>
auto REL::Relocation< T >::operator-> ( ) const
inlinenoexcept

◆ operator=() [1/3]

template<class T = std::uintptr_t>
Relocation& REL::Relocation< T >::operator= ( ID  a_id)
inline

◆ operator=() [2/3]

template<class T = std::uintptr_t>
Relocation& REL::Relocation< T >::operator= ( Offset  a_offset)
inline

◆ operator=() [3/3]

template<class T = std::uintptr_t>
constexpr Relocation& REL::Relocation< T >::operator= ( std::uintptr_t  a_address)
inlineconstexprnoexcept

◆ replace_func() [1/2]

template<class T = std::uintptr_t>
template<std::ptrdiff_t O = 0, class F >
void REL::Relocation< T >::replace_func ( const std::size_t  a_count,
const F  a_dst 
)
inline

◆ replace_func() [2/2]

template<class T = std::uintptr_t>
template<std::ptrdiff_t O = 0>
void REL::Relocation< T >::replace_func ( const std::size_t  a_count,
const std::uintptr_t  a_dst 
)
inline

◆ write() [1/2]

template<class T = std::uintptr_t>
template<class U >
void REL::Relocation< T >::write ( const std::span< U >  a_data)
inline

◆ write() [2/2]

template<class T = std::uintptr_t>
template<std::integral U>
void REL::Relocation< T >::write ( const U &  a_data)
inline

◆ write_branch() [1/2]

template<class T = std::uintptr_t>
template<std::size_t N, class F >
std::uintptr_t REL::Relocation< T >::write_branch ( const F  a_dst)
inline

◆ write_branch() [2/2]

template<class T = std::uintptr_t>
template<std::size_t N>
std::uintptr_t REL::Relocation< T >::write_branch ( const std::uintptr_t  a_dst)
inline

◆ write_call() [1/2]

template<class T = std::uintptr_t>
template<std::size_t N, class F >
std::uintptr_t REL::Relocation< T >::write_call ( const F  a_dst)
inline

◆ write_call() [2/2]

template<class T = std::uintptr_t>
template<std::size_t N>
std::uintptr_t REL::Relocation< T >::write_call ( const std::uintptr_t  a_dst)
inline

◆ write_fill()

template<class T = std::uintptr_t>
void REL::Relocation< T >::write_fill ( const std::uint8_t  a_value,
const std::size_t  a_count 
)
inline

◆ write_vfunc() [1/2]

template<class T = std::uintptr_t>
template<class F >
std::uintptr_t REL::Relocation< T >::write_vfunc ( const std::size_t  a_idx,
const F  a_newFunc 
)
inline

◆ write_vfunc() [2/2]

template<class T = std::uintptr_t>
template<class U = value_type>
std::uintptr_t REL::Relocation< T >::write_vfunc ( const std::size_t  a_idx,
const std::uintptr_t  a_newFunc 
)
inline

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