CommonLibSSE NG
Loading...
Searching...
No Matches
Relocation.h File Reference
#include "rapidcsv.h"

Go to the source code of this file.

Classes

class  REL::detail::memory_map
 
struct  REL::detail::meets_length_req< T >
 
struct  REL::detail::meets_function_req< T >
 
struct  REL::detail::meets_member_req< T >
 
struct  REL::detail::is_x64_pod< T, class >
 
struct  REL::detail::is_x64_pod< T, std::enable_if_t< std::is_union_v< T > > >
 
struct  REL::detail::is_x64_pod< T, std::enable_if_t< std::is_class_v< T > > >
 
class  REL::Version
 
class  REL::Segment
 
class  REL::Module
 
class  REL::IDDatabase
 
class  REL::IDDatabase::Offset2ID
 
class  REL::Offset
 
class  REL::VariantOffset
 
class  REL::ID
 
class  REL::RelocationID
 
class  REL::VariantID
 
class  REL::Relocation< T >
 
class  REL::detail::rules::Hexadecimal< HI, LO >
 
class  REL::detail::rules::Wildcard
 
class  REL::detail::PatternMatcher< Rules >
 
struct  REL::detail::RelocateVirtualHelper< T >
 
struct  REL::detail::RelocateVirtualHelper< Ret(This *)>
 
struct  REL::detail::RelocateVirtualHelper< Ret(This *, Args...)>
 
struct  REL::detail::RelocateVirtualHelper< Ret(This::*)()>
 
struct  REL::detail::RelocateVirtualHelper< Ret(This::*)(Args...)>
 
struct  REL::detail::RelocateVirtualHelper< Ret(This::*)() const >
 
struct  REL::detail::RelocateVirtualHelper< Ret(This::*)(Args...) const >
 
struct  fmt::formatter< REL::Version, CharT >
 

Namespaces

namespace  REL
 
namespace  REL::detail
 
namespace  REL::literals
 
namespace  REL::literals::detail
 
namespace  REL::detail::characters
 
namespace  REL::detail::rules
 
namespace  REL::detail::rules::detail
 
namespace  std
 
namespace  fmt
 

Macros

#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER_IMPL(a_nopropQual, a_propQual, ...)
 
#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER(a_qualifer, ...)
 
#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE(...)
 
#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER_IMPL(a_nopropQual, a_propQual, ...)
 
#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER(a_qualifer, ...)
 
#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE(...)
 
#define SKYRIM_ADDR   constexpr
 
#define SKYRIM_REL   constexpr
 
#define SKYRIM_REL_CONSTEXPR   constexpr
 
#define SKYRIM_REL_VR   constexpr
 
#define SKYRIM_REL_VR_CONSTEXPR   constexpr
 
#define SKYRIM_REL_VR_VIRTUAL   virtual
 

Typedefs

template<class F >
using REL::detail::member_function_pod_type_t = typename member_function_pod_type< F >::type
 
template<class F >
using REL::detail::member_function_non_pod_type_t = typename member_function_non_pod_type< F >::type
 

Functions

 REL::detail::REL_MAKE_MEMBER_FUNCTION_POD_TYPE ()
 
 REL::detail::REL_MAKE_MEMBER_FUNCTION_POD_TYPE (const)
 
 REL::detail::REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE ()
 
 REL::detail::REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE (const)
 
template<class F , class First , class... Rest>
decltype(auto) REL::detail::invoke_member_function_non_pod (F &&a_func, First &&a_first, Rest &&... a_rest) noexcept(std::is_nothrow_invocable_v< F, First, Rest... >)
 
template<class F , class... Args>
requires (std::invocable<F, Args...>)
std::invoke_result_t< F, Args... > REL::invoke (F &&a_func, Args &&... a_args) noexcept(std::is_nothrow_invocable_v< F, Args... >)
 
void REL::safe_write (std::uintptr_t a_dst, const void *a_src, std::size_t a_count)
 
template<std::integral T>
void REL::safe_write (std::uintptr_t a_dst, const T &a_data)
 
template<class T >
void REL::safe_write (std::uintptr_t a_dst, std::span< T > a_data)
 
void REL::safe_fill (std::uintptr_t a_dst, std::uint8_t a_value, std::size_t a_count)
 
constexpr bool REL::operator== (const Version &a_lhs, const Version &a_rhs) noexcept
 
constexpr std::strong_ordering REL::operator<=> (const Version &a_lhs, const Version &a_rhs) noexcept
 
template<std::size_t Index, char C>
constexpr uint8_t REL::literals::detail::read_version (std::array< typename REL::Version::value_type, 4 > &result)
 
template<std::size_t Index, char C, char... Rest>
requires (sizeof...(Rest) > 0)
constexpr uint8_t REL::literals::detail::read_version (std::array< typename REL::Version::value_type, 4 > &result)
 
template<char... C>
constexpr REL::Version REL::literals::operator""_v () noexcept
 
constexpr REL::Version REL::literals::operator""_v (const char *str, std::size_t len)
 
std::optional< VersionREL::get_file_version (stl::zwstring a_filename)
 
constexpr bool REL::detail::characters::hexadecimal (char a_ch) noexcept
 
constexpr bool REL::detail::characters::space (char a_ch) noexcept
 
constexpr bool REL::detail::characters::wildcard (char a_ch) noexcept
 
constexpr std::byte REL::detail::rules::detail::hexacharacters_to_hexadecimal (char a_hi, char a_lo) noexcept
 
template<char , char >
void REL::detail::rules::rule_for () noexcept
 
template<char C1, char C2>
requires (characters::hexadecimal(C1) && characters::hexadecimal(C2))
Hexadecimal< C1, C2 > REL::detail::rules::rule_for () noexcept
 
template<char C1, char C2>
requires (characters::wildcard(C1) && characters::wildcard(C2))
Wildcard REL::detail::rules::rule_for () noexcept
 
void REL::detail::consteval_error (const char *a_error)
 
template<stl::nttp::string S, class... Rules>
constexpr auto REL::detail::do_make_pattern () noexcept
 
template<class... Bytes>
consteval auto REL::detail::make_byte_array (Bytes... a_bytes) noexcept -> std::array< std::byte, sizeof...(Bytes)>
 
template<stl::nttp::string S>
constexpr auto REL::make_pattern () noexcept
 
template<class T >
SKYRIM_ADDRREL::Relocate (T &&a_seAndVR, T &&a_ae) noexcept
 
template<class T >
SKYRIM_RELREL::Relocate (T a_se, T a_ae, T a_vr) noexcept
 
template<class Fn , class... Args>
detail::RelocateVirtualHelper< Fn >::return_type REL::RelocateVirtual (std::ptrdiff_t a_seAndAEVtableOffset, std::ptrdiff_t a_vrVtableOffset, std::ptrdiff_t a_seAndAEVtableIndex, std::ptrdiff_t a_vrVtableIndex, typename detail::RelocateVirtualHelper< Fn >::this_type *a_self, Args &&... a_args)
 
template<class Fn , class... Args>
detail::RelocateVirtualHelper< Fn >::return_type REL::RelocateVirtual (std::ptrdiff_t a_seAndAEVtableIndex, std::ptrdiff_t a_vrVtableIndex, typename detail::RelocateVirtualHelper< Fn >::this_type *a_self, Args &&... a_args)
 
template<class T , class This >
T & REL::RelocateMember (This *a_self, std::ptrdiff_t a_seAndAE, std::ptrdiff_t a_vr)
 
template<class T , class This >
T & REL::RelocateMember (This *a_self, std::ptrdiff_t offset)
 
template<class T , class This >
T & REL::RelocateMemberIf (bool condition, This *a_self, std::ptrdiff_t a, std::ptrdiff_t b)
 
template<class T , class This >
T & REL::RelocateMemberIfNewer (Version v, This *a_self, std::ptrdiff_t older, std::ptrdiff_t newer)
 
std::string std::to_string (REL::Version a_version)
 

Variables

template<class T >
constexpr bool REL::detail::is_x64_pod_v = is_x64_pod<T>::value
 
constexpr std::uint8_t REL::NOP = 0x90
 
constexpr std::uint8_t REL::NOP2 [] = { 0x66, 0x90 }
 
constexpr std::uint8_t REL::NOP3 [] = { 0x0F, 0x1F, 0x00 }
 
constexpr std::uint8_t REL::NOP4 [] = { 0x0F, 0x1F, 0x40, 0x00 }
 
constexpr std::uint8_t REL::NOP5 [] = { 0x0F, 0x1F, 0x44, 0x00, 0x00 }
 
constexpr std::uint8_t REL::NOP6 [] = { 0x66, 0x0F, 0x1F, 0x44, 0x00, 0x00 }
 
constexpr std::uint8_t REL::NOP7 [] = { 0x0F, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00 }
 
constexpr std::uint8_t REL::NOP8 [] = { 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 }
 
constexpr std::uint8_t REL::NOP9 [] = { 0x66, 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00 }
 
constexpr std::uint8_t REL::JMP8 = 0xEB
 
constexpr std::uint8_t REL::JMP32 = 0xE9
 
constexpr std::uint8_t REL::RET = 0xC3
 
constexpr std::uint8_t REL::INT3 = 0xCC
 

Macro Definition Documentation

◆ REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE

#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE (   ...)
Value:
REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER(&, ##__VA_ARGS__) \
REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER(&&, ##__VA_ARGS__)
#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER(a_qualifer,...)
Definition Relocation.h:52

◆ REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER

#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER (   a_qualifer,
  ... 
)
Value:
REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER_IMPL(a_qualifer, noexcept, ##__VA_ARGS__)
#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER_IMPL(a_nopropQual, a_propQual,...)
Definition Relocation.h:33

◆ REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER_IMPL

#define REL_MAKE_MEMBER_FUNCTION_NON_POD_TYPE_HELPER_IMPL (   a_nopropQual,
  a_propQual,
  ... 
)
Value:
template < \
class R, \
class Cls, \
class... Args> \
struct member_function_non_pod_type<R (Cls::*)(Args...) __VA_ARGS__ a_nopropQual a_propQual> \
{ \
using type = R&(__VA_ARGS__ Cls*, void*, Args...)a_propQual; \
}; \
\
template < \
class R, \
class Cls, \
class... Args> \
struct member_function_non_pod_type<R (Cls::*)(Args..., ...) __VA_ARGS__ a_nopropQual a_propQual> \
{ \
using type = R&(__VA_ARGS__ Cls*, void*, Args..., ...)a_propQual; \
};

◆ REL_MAKE_MEMBER_FUNCTION_POD_TYPE

#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE (   ...)
Value:
REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER(&, ##__VA_ARGS__) \
REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER(&&, ##__VA_ARGS__)
#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER(a_qualifer,...)
Definition Relocation.h:24

◆ REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER

#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER (   a_qualifer,
  ... 
)
Value:
REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER_IMPL(a_qualifer, , ##__VA_ARGS__) \
REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER_IMPL(a_qualifer, noexcept, ##__VA_ARGS__)
#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER_IMPL(a_nopropQual, a_propQual,...)
Definition Relocation.h:5

◆ REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER_IMPL

#define REL_MAKE_MEMBER_FUNCTION_POD_TYPE_HELPER_IMPL (   a_nopropQual,
  a_propQual,
  ... 
)
Value:
template < \
class R, \
class Cls, \
class... Args> \
struct member_function_pod_type<R (Cls::*)(Args...) __VA_ARGS__ a_nopropQual a_propQual> \
{ \
using type = R(__VA_ARGS__ Cls*, Args...) a_propQual; \
}; \
\
template < \
class R, \
class Cls, \
class... Args> \
struct member_function_pod_type<R (Cls::*)(Args..., ...) __VA_ARGS__ a_nopropQual a_propQual> \
{ \
using type = R(__VA_ARGS__ Cls*, Args..., ...) a_propQual; \
};

◆ SKYRIM_ADDR

#define SKYRIM_ADDR   constexpr

A macro which defines a modifier for expressions that vary by Skyrim Address Library IDs.

Currently defined as constexpr since this build only targets one family of Address Library.

◆ SKYRIM_REL

#define SKYRIM_REL   constexpr

A macro which defines a modifier for expressions that vary by the specific Skyrim runtime.

Currently defined as constexpr since this build is for only a single runtime.

◆ SKYRIM_REL_CONSTEXPR

#define SKYRIM_REL_CONSTEXPR   constexpr

A macro which defines a modifier for expressions which may be constexpr when using selective targeting.

Currently defined as constexpr since this build is for only a single runtime.

◆ SKYRIM_REL_VR

#define SKYRIM_REL_VR   constexpr

A macro which defines a modifier for expressions that vary between Skyrim SE/AE and Skyrim VR.

Currently defined as constexpr since this build is only for VR or non-VR.

◆ SKYRIM_REL_VR_CONSTEXPR

#define SKYRIM_REL_VR_CONSTEXPR   constexpr

A macro which defines a modifier for expressions which may be constexpr when using selectively VR or non-VR.

Currently defined as constexpr since this build is only for VR or non-VR.

◆ SKYRIM_REL_VR_VIRTUAL

#define SKYRIM_REL_VR_VIRTUAL   virtual

A macro which defines a modifier for functions which may be virtual when using selectively VR or non-VR.

Currently defined as virtual since this build is only for VR or non-VR.