yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::core::Swizzler Class Reference

#include <message.h>

Public Member Functions

template<typename T >
void Swizzle (T *instance, void(T::*original_method)(), std::function< void()> new_method)
 
template<typename T >
void CallOriginal (T *instance)
 
template<typename T >
void CallSwizzled (T *instance)
 

Private Attributes

std::unordered_map< void *, std::function< void()> > swizzled_methods_
 
std::unordered_map< void *, void * > original_methods_
 

Detailed Description

Definition at line 89 of file message.h.

Member Function Documentation

◆ Swizzle()

template<typename T >
void yaze::app::core::Swizzler::Swizzle ( T * instance,
void(T::* original_method )(),
std::function< void()> new_method )

Definition at line 91 of file message.cc.

References original_methods_, and swizzled_methods_.

◆ CallOriginal()

template<typename T >
void yaze::app::core::Swizzler::CallOriginal ( T * instance)

Definition at line 98 of file message.cc.

References original_methods_.

◆ CallSwizzled()

template<typename T >
void yaze::app::core::Swizzler::CallSwizzled ( T * instance)

Definition at line 106 of file message.cc.

References swizzled_methods_.

Member Data Documentation

◆ swizzled_methods_

std::unordered_map<void*, std::function<void()> > yaze::app::core::Swizzler::swizzled_methods_
private

Definition at line 102 of file message.h.

Referenced by CallSwizzled(), and Swizzle().

◆ original_methods_

std::unordered_map<void*, void*> yaze::app::core::Swizzler::original_methods_
private

Definition at line 103 of file message.h.

Referenced by CallOriginal(), and Swizzle().


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