[xsd-users] no abstract base classes with "Customizing the generated type — the complex case"
Boris Kolpackov
boris at codesynthesis.com
Mon Aug 4 04:02:25 EDT 2014
Hi Oliver,
Oliver Schneider <xsd-users at oli-obk.de> writes:
> So, in addition to your previous fix, and to keep the possibility of
> adding the *_base type as a member instead of a base in the
> non-polymorphic case, could you either add a command-line argument to
> prevent the creation of _clone (manually for every _base class would be
> fine), or automatically not create it for polymorphic _base classes?
I gave it some thought and I don't think there is any use in having the
_clone() function generated in *_base classes at all. We cannot make it
pure virtual (that would prevent using *_base as a member). But we can
simply not generate it at all and I can't think of a good reason why the
user-supplied implementation would ever want to call _clone() on *_base.
Do you see any problems with this approach on your side?
Boris
More information about the xsd-users
mailing list