G
groups
Mark,
Yes, reinterpret_cast is indeed unsafe. But if there are no added
members, it works, as in CRect : RECT.
But this strays from what I'm hoping to accomplish.
How is it that serialization can magically create a Document object
through casting an "object" to "Document," but I'm not allowed to use
the same trick to create a MyDocument instead? The Serialization
classes don't know about Document while deserialization is occuring,
but it still lets you cast the return value of Deserialize into a
Document type. What is the trick they are using?
Tony
Yes, reinterpret_cast is indeed unsafe. But if there are no added
members, it works, as in CRect : RECT.
But this strays from what I'm hoping to accomplish.
How is it that serialization can magically create a Document object
through casting an "object" to "Document," but I'm not allowed to use
the same trick to create a MyDocument instead? The Serialization
classes don't know about Document while deserialization is occuring,
but it still lets you cast the return value of Deserialize into a
Document type. What is the trick they are using?
Tony