[xsd-users] Member of derived class is sliced on ouptut
Boris Kolpackov
boris at codesynthesis.com
Fri Aug 2 08:10:57 EDT 2013
Hi Victor,
Victor Fine <victor.fine at gmail.com> writes:
> I've generated cxx-tree classes from XSDs. I've used the following flags:
> --root-element-all --generate-polymorphic --generate-serialization
>
> One of the members of the object I'm serializing is holding a derived type
> (at least it is derived in the XSD schema)
>
> Though I can see the derived class members in the debugger, they are not
> included in output.
It is hard to say for certain what's wrong without more details.
I don't even know what kind of output you are talking about, XML,
ostream, binary?
But, most likely, you didn't tell XSD that the root of your
hierarchy is polymorphic with the --polymorphic-type option.
You could also use --polymorphic-type-all though that is not
recommended since it can result in significant code bloat.
Boris
More information about the xsd-users
mailing list