[xsde-users] Re: C++ enum mapping
Thomas Frenzel (TomSun)
tftomsun at streamteam.de
Tue Oct 27 12:36:01 EDT 2009
Hi Boris,
i've already tried the pre-release version. Everything works fine (the static polymorphic() method as well as the enum mapping). Very nice... :) Thank you!
Regards,
Tom
_____
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
To: Thomas Frenzel (TomSun) [mailto:tftomsun at streamteam.de]
Cc: xsde-users at codesynthesis.com
Sent: Tue, 27 Oct 2009 15:24:13 +0100
Subject: Re: C++ enum mapping
Hi Thomas,
Thomas Frenzel (TomSun) <tftomsun at streamteam.de> writes:
> I use xsd/e to exchange data between an embedded WinCE 5.0 device or
> Win32 PC and .NET code.
Ok, the binary is ready:
http://www.codesynthesis.com/~boris/tmp/xsde-3.2.0.a1-i686-windows.zip
You should be able to just copy your config files over and use it as
xsde-3.1.0-i686-windows. The two relevant changes are (quoting the
NEWS file):
* String-based types that use XML Schema restriction by enumeration are
now mapped to C++ classes with semantics similar to C++ enum. You can
suppress this new mapping and instead get the old behavior (plain
inheritance) by specifying the --suppress-enum compiler option. See
Section 4.3, "Enumerations" in the Getting Started Guide for more
information.
* When the code is generated with the --generate-polymorphic or
--runtime-polymorphic option, the resulting parser and serializer
aggregate classes provide the static polymorphic() function which
returns true if the object model corresponding to the root element
or root type is polymorphic and false otherwise. This can be used
together with the XSDE_POLYMORPHIC macro to implement generic parsing
and serialization code that works with both polymorphic and non-
polymorphic object models.
Let us know if you run into any problems.
Boris
More information about the xsde-users
mailing list