12 #ifndef SST_CORE_SERIALIZATION_IMPL_UNPACKER_H 13 #define SST_CORE_SERIALIZATION_IMPL_UNPACKER_H 15 #ifndef SST_INCLUDING_SERIALIZER_H 17 "The header file sst/core/serialization/impl/unpacker.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serializer.h" 20 #include "sst/core/serialization/impl/ser_buffer_accessor.h" 21 #include "sst/core/serialization/impl/ser_shared_ptr_tracker.h" 27 #include <type_traits> 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; }
68 #endif // SST_CORE_SERIALIZATION_IMPL_UNPACKER_H Definition: ser_buffer_accessor.h:25
Definition: unpacker.h:31
Definition: baseComponent.cc:1107
Definition: ser_shared_ptr_tracker.h:60