diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-14 12:21:35 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-14 12:21:35 +0200 |
commit | b7197929af1cca15e490703ba3632ae52a348b60 (patch) | |
tree | e4ed9dc7cf2021d6ad398fade7fc8148ff982b16 /xsde/xsde.cxx | |
parent | 6f395f9f769866a04f6949cb7ed14f93d90cf728 (diff) |
New mapping for anyType with support for polymorphism
Diffstat (limited to 'xsde/xsde.cxx')
-rw-r--r-- | xsde/xsde.cxx | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/xsde/xsde.cxx b/xsde/xsde.cxx index 2281ae9..476869e 100644 --- a/xsde/xsde.cxx +++ b/xsde/xsde.cxx @@ -499,12 +499,6 @@ main (Int argc, Char* argv[]) h_ops = new CXX::Hybrid::CLI::Options ( CLI::parse (CXX::Hybrid::Generator::options_spec (), args)); - if (h_ops->value<CXX::Hybrid::CLI::generate_parser> ()) - p_ops = CXX::Hybrid::Generator::parser_options (*h_ops); - - if (h_ops->value<CXX::Hybrid::CLI::generate_serializer> ()) - s_ops = CXX::Hybrid::Generator::serializer_options (*h_ops); - show_sloc = h_ops->value<CXX::Hybrid::CLI::show_sloc> (); } @@ -885,6 +879,18 @@ main (Int argc, Char* argv[]) // The first schema. Will be handled later. // root = &b->schema (); + + // Create parser/serializer options (we need a schema, any + // schema to do this). + // + if (gen_parser && !p_ops) + p_ops = CXX::Hybrid::Generator::parser_options ( + *h_ops, *root, b->path ()); + + if (gen_serializer && !s_ops) + s_ops = CXX::Hybrid::Generator::serializer_options ( + *h_ops, *root, b->path ()); + ++b; for (Schema::UsesIterator e (schema->uses_end ()); b != e; ++b) @@ -909,8 +915,21 @@ main (Int argc, Char* argv[]) } } else + { root = schema.get (); + // Create parser/serializer options (we need a schema, any + // schema to do this). + // + if (gen_parser && !p_ops) + p_ops = CXX::Hybrid::Generator::parser_options ( + *h_ops, *root, tu); + + if (gen_serializer && !s_ops) + s_ops = CXX::Hybrid::Generator::serializer_options ( + *h_ops, *root, tu); + } + // Generate mapping. // TypeMap::Namespaces parser_type_map, serializer_type_map; @@ -1157,6 +1176,17 @@ main (Int argc, Char* argv[]) ? s.context ().get<SemanticGraph::Path> ("renamed") : s.used_begin ()->path ()); + // Create parser/serializer options (we need a schema, any + // schema to do this). + // + if (gen_parser && !p_ops) + p_ops = CXX::Hybrid::Generator::parser_options ( + *h_ops, s, path); + + if (gen_serializer && !s_ops) + s_ops = CXX::Hybrid::Generator::serializer_options ( + *h_ops, s, path); + TypeMap::Namespaces parser_type_map, serializer_type_map; if (gen_hybrid) |