How to load polymorphic class without knowing its polymorphic_id?
22 views
Skip to first unread message
Romain Noël
unread,
Aug 5, 2021, 7:37:35 AM8/5/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cereal serialization library
Dear developers,
I would like to load an XML archive into a polymorphic pointer,
therefore I followed the examples on the page
https://uscilab.github.io/cereal/polymorphism.html<https://uscilab.github.io/cereal/polymorphism.html> .
But I would like to be able to load a fill without knowing the
polymorphic_id value which is internal to cereal, since in my
application the input XML files are filled by users not by computers.
So I could reinject the polymorphic_id information by a postprocessing
of my input XML file.
This means that I need to have access to the map linking the
polymorphic_id to the class names.
How can I have access to this map ? Or is it possible to load a
structure into a polymorphic pointer without filling the polymorphic_id ?