mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-27 15:11:01 +00:00
Add icicle mmio support
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
#include "object.hpp"
|
||||
#include <utils/object.hpp>
|
||||
|
||||
template <typename ReturnType, typename... Args>
|
||||
class function_wrapper : public object
|
||||
class function_wrapper : public utils::object
|
||||
{
|
||||
public:
|
||||
using user_data_pointer = void*;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
struct object
|
||||
{
|
||||
object() = default;
|
||||
virtual ~object() = default;
|
||||
|
||||
object(object&&) = default;
|
||||
object(const object&) = default;
|
||||
object& operator=(object&&) = default;
|
||||
object& operator=(const object&) = default;
|
||||
};
|
||||
@@ -75,7 +75,7 @@ namespace unicorn
|
||||
}
|
||||
}
|
||||
|
||||
struct hook_object : object
|
||||
struct hook_object : utils::object
|
||||
{
|
||||
emulator_hook* as_opaque_hook()
|
||||
{
|
||||
@@ -87,7 +87,7 @@ namespace unicorn
|
||||
{
|
||||
public:
|
||||
template <typename T>
|
||||
requires(std::is_base_of_v<object, T> && std::is_move_constructible_v<T>)
|
||||
requires(std::is_base_of_v<utils::object, T> && std::is_move_constructible_v<T>)
|
||||
void add(T data, unicorn_hook hook)
|
||||
{
|
||||
hook_entry entry{};
|
||||
@@ -101,7 +101,7 @@ namespace unicorn
|
||||
private:
|
||||
struct hook_entry
|
||||
{
|
||||
std::unique_ptr<object> data{};
|
||||
std::unique_ptr<utils::object> data{};
|
||||
unicorn_hook hook{};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user