diff options
Diffstat (limited to 'xsde/cxx/serializer')
-rw-r--r-- | xsde/cxx/serializer/generator.cxx | 10 | ||||
-rw-r--r-- | xsde/cxx/serializer/generator.hxx | 17 | ||||
-rw-r--r-- | xsde/cxx/serializer/name-processor.cxx | 11 | ||||
-rw-r--r-- | xsde/cxx/serializer/name-processor.hxx | 5 | ||||
-rw-r--r-- | xsde/cxx/serializer/validator.cxx | 2 |
5 files changed, 35 insertions, 10 deletions
diff --git a/xsde/cxx/serializer/generator.cxx b/xsde/cxx/serializer/generator.cxx index c27ef09..5e72d86 100644 --- a/xsde/cxx/serializer/generator.cxx +++ b/xsde/cxx/serializer/generator.cxx @@ -519,6 +519,14 @@ namespace CXX return spec; } + Void Serializer::Generator:: + process_names (CLI::Options const& ops, + XSDFrontend::SemanticGraph::Schema& schema, + XSDFrontend::SemanticGraph::Path const& file) + { + NameProcessor proc; + proc.process (ops, schema, file, false); + } namespace { @@ -637,7 +645,7 @@ namespace CXX // { NameProcessor proc; - proc.process (ops, schema, file_path); + proc.process (ops, schema, file_path, true); } // diff --git a/xsde/cxx/serializer/generator.hxx b/xsde/cxx/serializer/generator.hxx index a5b8558..eaa378d 100644 --- a/xsde/cxx/serializer/generator.hxx +++ b/xsde/cxx/serializer/generator.hxx @@ -35,17 +35,26 @@ namespace CXX static CLI::OptionsSpec options_spec (); + // Assign names to global declarations. + // + static Void + process_names (CLI::Options const&, + XSDFrontend::SemanticGraph::Schema&, + XSDFrontend::SemanticGraph::Path const&); + + // Generate code. + // struct Failed {}; static UnsignedLong - generate (CLI::Options const& options, + generate (CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, - XSDFrontend::SemanticGraph::Path const& file, + XSDFrontend::SemanticGraph::Path const&, TypeMap::Namespaces& type_map, Boolean gen_driver, const WarningSet& disabled_warnings, - FileList& file_list, - AutoUnlinks& unlinks); + FileList&, + AutoUnlinks&); private: Generator (); diff --git a/xsde/cxx/serializer/name-processor.cxx b/xsde/cxx/serializer/name-processor.cxx index d68b823..140ad06 100644 --- a/xsde/cxx/serializer/name-processor.cxx +++ b/xsde/cxx/serializer/name-processor.cxx @@ -1307,7 +1307,8 @@ namespace CXX Void process_impl (CLI::Options const& ops, SemanticGraph::Schema& tu, - SemanticGraph::Path const& file) + SemanticGraph::Path const& file, + Boolean deep) { Context ctx (ops, tu, file); @@ -1373,6 +1374,9 @@ namespace CXX schema.dispatch (tu); } + if (!deep) + return; + // Pass three - assign names inside complex types. Here we don't // need to go into included/imported schemas. // @@ -1401,9 +1405,10 @@ namespace CXX Void NameProcessor:: process (CLI::Options const& ops, SemanticGraph::Schema& tu, - SemanticGraph::Path const& file) + SemanticGraph::Path const& file, + Boolean deep) { - process_impl (ops, tu, file); + process_impl (ops, tu, file, deep); } } } diff --git a/xsde/cxx/serializer/name-processor.hxx b/xsde/cxx/serializer/name-processor.hxx index bf69ba6..f7cd63b 100644 --- a/xsde/cxx/serializer/name-processor.hxx +++ b/xsde/cxx/serializer/name-processor.hxx @@ -22,9 +22,10 @@ namespace CXX { public: Void - process (CLI::Options const& options, + process (CLI::Options const&, XSDFrontend::SemanticGraph::Schema&, - XSDFrontend::SemanticGraph::Path const& file); + XSDFrontend::SemanticGraph::Path const&, + Boolean deep); }; } } diff --git a/xsde/cxx/serializer/validator.cxx b/xsde/cxx/serializer/validator.cxx index d9cc724..189ccac 100644 --- a/xsde/cxx/serializer/validator.cxx +++ b/xsde/cxx/serializer/validator.cxx @@ -34,6 +34,8 @@ namespace CXX subst_group_warning_issued (subst_group_warning_issued_), subst_group_warning_issued_ (false) { + if (disabled_warnings_.find ("all") != disabled_warnings_.end ()) + disabled_warnings_all_ = true; } public: |