You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I have a bunch of Outer and Inner Objects.
When serializing the Outer objects, I just serialize the ID of the Inner.
The Serialization of the Inner Objects happens elsewhere.
Now I deserialize the Inner Objects to a map like std::map<uint32_t, Inner*>.
Then I want to deserialize the Outer Objects using Cereal. When deserializing an Outer object, I want to read the ID, look the already deserialized Inner Object up in the map and store it inside the Outer Node. For this I thought an implementation of the load method as mentioned in the documentation could work. This means when deserializing the Outer object I need to have accesss to this map. I do not want the Map to be static. Is there another way to give the deserializer this "context"? Are there other ways to acomplish my goal? Maybe my approach is totally wrong?
Appreciate your time, have a great day :)
The text was updated successfully, but these errors were encountered:
I have two structs like that:
Now I have a bunch of Outer and Inner Objects.
When serializing the Outer objects, I just serialize the ID of the Inner.
The Serialization of the Inner Objects happens elsewhere.
Now I deserialize the Inner Objects to a map like
std::map<uint32_t, Inner*>
.Then I want to deserialize the Outer Objects using Cereal. When deserializing an Outer object, I want to read the ID, look the already deserialized Inner Object up in the map and store it inside the Outer Node. For this I thought an implementation of the load method as mentioned in the documentation could work. This means when deserializing the Outer object I need to have accesss to this map. I do not want the Map to be static. Is there another way to give the deserializer this "context"? Are there other ways to acomplish my goal? Maybe my approach is totally wrong?
Appreciate your time, have a great day :)
The text was updated successfully, but these errors were encountered: