[xsde-users] Re: C++ enum mapping

Boris Kolpackov boris at codesynthesis.com
Tue Oct 27 10:24:13 EDT 2009


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