diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-18 11:17:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-18 11:17:51 +0200 |
commit | d80d096ee8743fd6f7382d274272b0b6d7faf9bf (patch) | |
tree | d0f0bee1e645cb2b86b6837ac0db8a7d2821e533 /xsde/cxx | |
parent | 0e4637025fa8d1b4234b0512561d31f0dd023843 (diff) |
Support for schema evolution using substitution groups
New examples: hybrid/evolution/ignore and hybrid/evolution/passthrough.
Diffstat (limited to 'xsde/cxx')
-rw-r--r-- | xsde/cxx/parser/element-validation-source.cxx | 4 | ||||
-rw-r--r-- | xsde/cxx/parser/parser-header.cxx | 6 | ||||
-rw-r--r-- | xsde/cxx/serializer/element-validation-source.cxx | 3 | ||||
-rw-r--r-- | xsde/cxx/serializer/serializer-header.cxx | 6 | ||||
-rw-r--r-- | xsde/cxx/serializer/serializer-source.cxx | 6 |
5 files changed, 19 insertions, 6 deletions
diff --git a/xsde/cxx/parser/element-validation-source.cxx b/xsde/cxx/parser/element-validation-source.cxx index 5533549..82428f6 100644 --- a/xsde/cxx/parser/element-validation-source.cxx +++ b/xsde/cxx/parser/element-validation-source.cxx @@ -494,9 +494,7 @@ namespace CXX } else { - os << "ctx.current_.any_ = true;" - << "ctx.current_.depth_++;" - << endl + os << "ctx.start_wildcard_content ();" << "this->_start_any_element (ns, n" << (poly_runtime ? (poly_code ? ", t" : ", 0") : "") << ");" << "}" diff --git a/xsde/cxx/parser/parser-header.cxx b/xsde/cxx/parser/parser-header.cxx index 2498768..bf9e31e 100644 --- a/xsde/cxx/parser/parser-header.cxx +++ b/xsde/cxx/parser/parser-header.cxx @@ -1625,6 +1625,11 @@ namespace CXX << "using ::xsde::cxx::parser::parser_map_impl;" << endl; + os << "// Parser substitution map callack." << endl + << "//" << endl + << "using ::xsde::cxx::parser::parser_smap_callback;" + << endl; + os << "// Substitution and inheritance hashmaps load querying." << endl << "//" << endl << "using ::xsde::cxx::parser::parser_smap_buckets;" @@ -1775,6 +1780,7 @@ namespace CXX if (ctx.poly_code) { ctx.os << "#include <xsde/cxx/parser/map.hxx>" << endl + << "#include <xsde/cxx/parser/substitution-map-callback.hxx>" << endl << "#include <xsde/cxx/parser/substitution-map-load.hxx>" << endl; if (ctx.validation) diff --git a/xsde/cxx/serializer/element-validation-source.cxx b/xsde/cxx/serializer/element-validation-source.cxx index 3ca784d..bb09275 100644 --- a/xsde/cxx/serializer/element-validation-source.cxx +++ b/xsde/cxx/serializer/element-validation-source.cxx @@ -447,7 +447,8 @@ namespace CXX os << "if (dt != 0 && " << "::xsde::cxx::serializer::substitution_map_instance ()" << - ".check (ns, n, dt))" << endl + ".check (ns, n, dt, " << (ret == L"void" ? "0" : "&r") << + "))" << endl << "dt = 0;" << endl; diff --git a/xsde/cxx/serializer/serializer-header.cxx b/xsde/cxx/serializer/serializer-header.cxx index bf2c724..2d65cf2 100644 --- a/xsde/cxx/serializer/serializer-header.cxx +++ b/xsde/cxx/serializer/serializer-header.cxx @@ -1787,6 +1787,11 @@ namespace CXX << "using ::xsde::cxx::serializer::serializer_map_impl;" << endl; + os << "// Serializer substitution map callack." << endl + << "//" << endl + << "using ::xsde::cxx::serializer::serializer_smap_callback;" + << endl; + os << "// Substitution and inheritance hashmaps load querying." << endl << "//" << endl << "using ::xsde::cxx::serializer::serializer_smap_buckets;" @@ -1938,6 +1943,7 @@ namespace CXX if (ctx.poly_code) { ctx.os << "#include <xsde/cxx/serializer/map.hxx>" << endl + << "#include <xsde/cxx/serializer/substitution-map-callback.hxx>" << endl << "#include <xsde/cxx/serializer/substitution-map-load.hxx>" << endl; if (ctx.validation) diff --git a/xsde/cxx/serializer/serializer-source.cxx b/xsde/cxx/serializer/serializer-source.cxx index e75a4ed..ab5c123 100644 --- a/xsde/cxx/serializer/serializer-source.cxx +++ b/xsde/cxx/serializer/serializer-source.cxx @@ -1108,7 +1108,8 @@ namespace CXX os << "if (dt != 0 && " << "::xsde::cxx::serializer::substitution_map_instance ()" << - ".check (ns, n, dt))" << endl + ".check (ns, n, dt, " << (ret == L"void" ? "0" : "&r") << + "))" << endl << "dt = 0;" << endl; @@ -1190,7 +1191,8 @@ namespace CXX os << "if (dt != 0 && " << "::xsde::cxx::serializer::substitution_map_instance ()" << - ".check (ns, n, dt))" << endl + ".check (ns, n, dt, " << (ret == L"void" ? "0" : "&r") << + "))" << endl << "dt = 0;" << endl; |