31class ser_unpacker :
public ser_buffer_accessor,
public ser_shared_ptr_unpacker
33 std::map<uintptr_t, uintptr_t> ser_pointer_map;
34 uintptr_t split_key = 0;
38 using ser_buffer_accessor::ser_buffer_accessor;
43 memcpy(&t, buf_next(
sizeof(t)),
sizeof(t));
46 template <
typename T,
typename SIZE_T>
47 void unpack_buffer(T*& buffer, SIZE_T& size)
52 using ELEM_T = std::conditional_t<std::is_void_v<T>, char, T>;
53 buffer =
new ELEM_T[size];
54 memcpy(buffer, buf_next(size *
sizeof(ELEM_T)), size *
sizeof(ELEM_T));
60 uintptr_t check_pointer_unpack(uintptr_t ptr);
61 void unpack_string(std::string& str);
62 void report_new_pointer(uintptr_t real_ptr) { ser_pointer_map[split_key] = real_ptr; }
63 void report_real_pointer(uintptr_t ptr, uintptr_t real_ptr) { ser_pointer_map[ptr] = real_ptr; }