I'm working on integrating Boost serialization into an OMNeT++ simulation as a means of saving a partial simulation state (to speed up statistical testing). The problem I am running into is related to the process of deserializing a derived-class object by a base-class pointer without tracking.
As far as I can tell, in this case the serialization library normally:
1. Determines the most-derived type
2. Allocates memory for that type of object
3. Updates the pointer to point the the above allocated memory block
4. Invokes placement new and the default constructor (overloadable by load_construct_data)
5. Calls the class' serialize() or load() method on the newly-constructed object
However, I have a case where I start out with an existing derived-class object that is partially initialized, and I just want to call the serialize() or load() method for it using a base-class pointer (i.e., no memory allocation since that's already done, and no constructor call since that's also already done.) Is this possible or am I trying to do something the serialization library is not meant for?
Thanks,
Adam Verigin