diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-04-15 13:57:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-04-15 13:57:30 +0200 |
commit | 417548d2097c56d95cab7587cffeea7004d33117 (patch) | |
tree | 3cf3992be1c8c1cc23e651126115b3007c2006c2 | |
parent | 85dbd31349b94a488669fd848cd947d9aa212e3f (diff) |
Turn on union to enum synthesis for C++/Hybrid
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | xsde/xsde.cxx | 17 |
2 files changed, 21 insertions, 0 deletions
@@ -50,6 +50,10 @@ Version 3.2.0 and serialization code that works with both polymorphic and non- polymorphic object models. + * XML Schema union types with members that are enumeration types are + automatically converted to equivalent enumeration types with a union + of all the member's enumerators. + Version 3.1.0 C++/Hybrid diff --git a/xsde/xsde.cxx b/xsde/xsde.cxx index 4311f9a..2281ae9 100644 --- a/xsde/xsde.cxx +++ b/xsde/xsde.cxx @@ -21,6 +21,7 @@ #include <xsd-frontend/parser.hxx> #include <xsd-frontend/transformations/anonymous.hxx> +#include <xsd-frontend/transformations/enum-synthesis.hxx> #include <xsd-frontend/transformations/restriction.hxx> #include <xsd-frontend/transformations/schema-per-type.hxx> #include <xsd-frontend/transformations/simplifier.hxx> @@ -795,6 +796,14 @@ main (Int argc, Char* argv[]) } } + // Synthesize enumerations from unions. + // + if (gen_hybrid) + { + Transformations::EnumSynthesis trans; + trans.transform (*schema, tu); + } + // Simplify the schema graph. // { @@ -1077,6 +1086,14 @@ main (Int argc, Char* argv[]) } } + // Synthesize enumerations from unions. + // + if (gen_hybrid) + { + Transformations::EnumSynthesis trans; + trans.transform (*schema, ""); + } + // Simplify the schema graph. // { |