diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 |
commit | bada6666c70977a058755ccf232e7d67b24adeed (patch) | |
tree | 1e92d50cebce96abaf9bce19e36026c47f77b9ba /xsd/xsd/cxx/tree/tree-forward.cxx | |
parent | eaf34adcbd8095bc6d1f3371b1227f654c7b19fc (diff) |
New upstream release
Diffstat (limited to 'xsd/xsd/cxx/tree/tree-forward.cxx')
-rw-r--r-- | xsd/xsd/cxx/tree/tree-forward.cxx | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/xsd/xsd/cxx/tree/tree-forward.cxx b/xsd/xsd/cxx/tree/tree-forward.cxx index 214cc75..5afae3c 100644 --- a/xsd/xsd/cxx/tree/tree-forward.cxx +++ b/xsd/xsd/cxx/tree/tree-forward.cxx @@ -1,6 +1,5 @@ // file : xsd/cxx/tree/tree-forward.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <cxx/tree/tree-forward.hxx> @@ -22,7 +21,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& l) { String const& name (ename (l)); @@ -52,7 +51,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& u) { String const& name (ename (u)); @@ -82,7 +81,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& e) { String const& name (ename (e)); @@ -112,7 +111,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& c) { String const& name (ename (c)); @@ -136,16 +135,16 @@ namespace CXX }; } - Void + void generate_forward (Context& ctx) { - NarrowString xml_schema (ctx.options.value<CLI::extern_xml_schema> ()); + NarrowString xml_schema (ctx.options.extern_xml_schema ()); // Inlcude or Emit fundamental types. // if (xml_schema) { - String name (ctx.hxx_expr->merge (xml_schema)); + String name (ctx.hxx_expr->replace (xml_schema)); ctx.os << "#include " << ctx.process_include_path (name) << endl << endl; @@ -164,21 +163,21 @@ namespace CXX << "#include <xsd/cxx/tree/types.hxx>" << endl << endl; - if (!ctx.options.value<CLI::suppress_parsing> () || - ctx.options.value<CLI::generate_serialization> ()) + if (!ctx.options.suppress_parsing () || + ctx.options.generate_serialization ()) { ctx.os << "#include <xsd/cxx/xml/error-handler.hxx>" << endl << endl; } - if (!ctx.options.value<CLI::suppress_parsing> () || - ctx.options.value<CLI::generate_serialization> ()) + if (!ctx.options.suppress_parsing () || + ctx.options.generate_serialization ()) { ctx.os << "#include <xsd/cxx/xml/dom/auto-ptr.hxx>" << endl << endl; } - Boolean element_map (ctx.options.value<CLI::generate_element_map> ()); + bool element_map (ctx.options.generate_element_map ()); if (element_map) ctx.os << "#include <xsd/cxx/tree/element-map.hxx>" << endl @@ -188,7 +187,7 @@ namespace CXX // later in the individual generators for each feature because // those headers provide implementation for the fundamental types. // - if (!ctx.options.value<CLI::suppress_parsing> ()) + if (!ctx.options.suppress_parsing ()) { ctx.os << "#include <xsd/cxx/tree/parsing.hxx>" << endl; @@ -210,7 +209,7 @@ namespace CXX ctx.os << endl; } - if (ctx.options.value<CLI::generate_serialization> ()) + if (ctx.options.generate_serialization ()) { ctx.os << "#include <xsd/cxx/xml/dom/serialization-header.hxx>" << endl << "#include <xsd/cxx/tree/serialization.hxx>" << endl; @@ -233,18 +232,17 @@ namespace CXX ctx.os << endl; } - if (ctx.options.value<CLI::generate_ostream> ()) + if (ctx.options.generate_ostream ()) { ctx.os << "#include <xsd/cxx/tree/std-ostream-operators.hxx>" << endl << endl; } - typedef Containers::Vector<NarrowString> Streams; - - Streams const& ist (ctx.options.value<CLI::generate_insertion> ()); + NarrowStrings const& ist (ctx.options.generate_insertion ()); if (!ist.empty ()) { - for (Streams::ConstIterator i (ist.begin ()); i != ist.end (); ++i) + for (NarrowStrings::const_iterator i (ist.begin ()); i != ist.end (); + ++i) { if (*i == "ACE_OutputCDR") ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-insertion.hxx>" @@ -258,10 +256,11 @@ namespace CXX << endl; } - Streams const& est (ctx.options.value<CLI::generate_extraction> ()); + NarrowStrings const& est (ctx.options.generate_extraction ()); if (!est.empty ()) { - for (Streams::ConstIterator i (est.begin ()); i != est.end (); ++i) + for (NarrowStrings::const_iterator i (est.begin ()); i != est.end (); + ++i) { if (*i == "ACE_InputCDR") ctx.os << "#include <xsd/cxx/tree/ace-cdr-stream-extraction.hxx>" @@ -288,7 +287,7 @@ namespace CXX // First emit header includes. // - if (ctx.options.value<CLI::generate_forward> ()) + if (ctx.options.generate_forward ()) { Traversal::Schema schema; Includes includes (ctx, Includes::forward); @@ -302,7 +301,7 @@ namespace CXX << "//" << endl; Traversal::Schema schema; - Traversal::Sources sources; + Sources sources; Traversal::Names names_ns, names; Namespace ns (ctx); |