Support afd endpoint serialization

This commit is contained in:
momo5502
2024-11-17 09:23:45 +01:00
parent d05ccdd04c
commit a87bb85858
5 changed files with 124 additions and 17 deletions

View File

@@ -4,13 +4,39 @@
// TODO: Replace with pointer handling structure for future 32 bit support
using emulator_pointer = uint64_t;
struct emulator_wrapper
{
emulator* emu;
emulator& get() const
{
return *this->emu;
}
operator emulator&() const
{
return this->get();
}
void serialize(utils::buffer_serializer&) const
{
}
void deserialize(utils::buffer_deserializer&)
{
}
};
template <typename T>
class emulator_object
{
public:
using value_type = T;
//emulator_object() = default;
emulator_object(const emulator_wrapper& wrapper, const uint64_t address = 0)
: emulator_object(wrapper.emu, address)
{
}
emulator_object(emulator& emu, const uint64_t address = 0)
: emu_(&emu)