diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-25 14:54:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-11-25 14:54:24 +0200 |
commit | c5e3c6ee3e291a5dfc6670160677f4962d526dc4 (patch) | |
tree | 2b3440a35d7174719d096ddb868ec4529a94af43 /xsde/cxx/serializer/serializer-header.cxx | |
parent | b7c3f32ea4e68a0865761f65d68a011ab9606363 (diff) |
Add the {parser,serializer}_maps functions to set polymorphic maps
Use that in the generated aggregate classes in C++/Hybrid instead
of the individual setters since their names are unknown for included
and imported schemas.
Diffstat (limited to 'xsde/cxx/serializer/serializer-header.cxx')
-rw-r--r-- | xsde/cxx/serializer/serializer-header.cxx | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/xsde/cxx/serializer/serializer-header.cxx b/xsde/cxx/serializer/serializer-header.cxx index a849946..9321482 100644 --- a/xsde/cxx/serializer/serializer-header.cxx +++ b/xsde/cxx/serializer/serializer-header.cxx @@ -1147,17 +1147,44 @@ namespace CXX os << "// Serializer construction API." << endl << "//" << endl; + // serializers () + // os << "void" << endl << "serializers ("; { - SerializerParamDecl decl (*this, false); + SerializerParamDecl decl (*this, false, false); decl.traverse (c); } os << ");" << endl; + // serializer_maps () + // + if (poly_code && he) + { + Boolean r (false); + SerializerParamTest test (*this, r, true); + test.traverse (c); + + // Have potentially polymorphic elements. + // + if (r) + { + os << "void" << endl + << "serializer_maps ("; + + { + SerializerParamDecl decl (*this, false, true); + decl.traverse (c); + } + + os << ");" + << endl; + } + } + if (ha) { os << "// Individual attribute serializers." << endl |