diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-07-03 09:57:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-07-03 09:57:09 +0200 |
commit | 1a4099b78717b16f632b0e7e0980a27811221e52 (patch) | |
tree | 87a63393fc207082b7418987309581a9a79e49a4 /xsd/cxx/tree/stream-extraction-source.cxx | |
parent | 06258b8eae3d5af9a1af0206bb5a8e5c80dde455 (diff) |
Implement anyType and anySimpleType content representation
anyType as a DOM fragment, similar to wildcards. anySimpleType as
a text string.
Diffstat (limited to 'xsd/cxx/tree/stream-extraction-source.cxx')
-rw-r--r-- | xsd/cxx/tree/stream-extraction-source.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/xsd/cxx/tree/stream-extraction-source.cxx b/xsd/cxx/tree/stream-extraction-source.cxx index a1ca4bc..ceb56c1 100644 --- a/xsd/cxx/tree/stream-extraction-source.cxx +++ b/xsd/cxx/tree/stream-extraction-source.cxx @@ -321,6 +321,7 @@ namespace CXX SemanticGraph::Type& t (e.type ()); String type (etype (e)); + String tr (etraits (e)); // traits type name bool fund (false); { @@ -389,8 +390,8 @@ namespace CXX } else { - os << auto_ptr << "< " << type << " > r (new " << type << - " (s, f, this));"; + os << auto_ptr << "< " << type << " > r (" << endl + << tr << "::create (s, f, this));"; } os << "c.push_back (" << r << ");" @@ -438,8 +439,8 @@ namespace CXX } else { - os << auto_ptr << "< " << type << " > r (new " << type << - " (s, f, this));"; + os << auto_ptr << "< " << type << " > r (" << endl + << tr << "::create (s, f, this));"; } os << "this->" << member << ".set (" << r << ");" @@ -482,8 +483,8 @@ namespace CXX } else { - os << auto_ptr << "< " << type << " > r (new " << type << - " (s, f, this));"; + os << auto_ptr << "< " << type << " > r (" << endl + << tr << "::create (s, f, this));"; } os << "this->" << member << ".set (" << r << ");" @@ -507,6 +508,7 @@ namespace CXX { String const& member (emember (a)); String type (etype (a)); + String tr (etraits (a)); // traits type name bool fund (false); { @@ -530,8 +532,8 @@ namespace CXX } else { - os << "this->" << member << ".set (" << auto_ptr << "< " << - type << " > (new " << type << " (s, f, this)));"; + os << "this->" << member << ".set (" << tr << + "::create (s, f, this));"; } os << "}" // if (p) @@ -549,8 +551,8 @@ namespace CXX } else { - os << "this->" << member << ".set (" << auto_ptr << "< " << - type << " > (new " << type << " (s, f, this)));"; + os << "this->" << member << ".set (" << tr << + "::create (s, f, this));"; } os << "}"; |