From c04f7d6ed04d62efafa79a87bcde6c5f62e95327 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Jun 2012 11:54:24 +0200 Subject: Completion of the CLI port --- xsd/cxx/tree/stream-insertion-source.cxx | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'xsd/cxx/tree/stream-insertion-source.cxx') diff --git a/xsd/cxx/tree/stream-insertion-source.cxx b/xsd/cxx/tree/stream-insertion-source.cxx index 00d9ae2..2dbbc79 100644 --- a/xsd/cxx/tree/stream-insertion-source.cxx +++ b/xsd/cxx/tree/stream-insertion-source.cxx @@ -14,8 +14,6 @@ namespace CXX { namespace { - typedef Containers::Vector Streams; - struct List: Traversal::List, Context { List (Context& c) @@ -46,8 +44,9 @@ namespace CXX base += L" >"; UnsignedLong n (0); - Streams const& st (options.value ()); - for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i) + NarrowStrings const& st (options.generate_insertion ()); + for (NarrowStrings::const_iterator i (st.begin ()); i != st.end (); + ++i) { String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >"); @@ -116,8 +115,9 @@ namespace CXX String const& base (xs_string_type); UnsignedLong n (0); - Streams const& st (options.value ()); - for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i) + NarrowStrings const& st (options.generate_insertion ()); + for (NarrowStrings::const_iterator i (st.begin ()); i != st.end (); + ++i) { String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >"); @@ -193,8 +193,9 @@ namespace CXX value = evalue (e); UnsignedLong n (0); - Streams const& st (options.value ()); - for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i) + NarrowStrings const& st (options.generate_insertion ()); + for (NarrowStrings::const_iterator i (st.begin ()); i != st.end (); + ++i) { String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >"); @@ -406,8 +407,9 @@ namespace CXX Boolean has_body (has (c) || c.inherits_p ()); UnsignedLong n (0); - Streams const& st (options.value ()); - for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i) + NarrowStrings const& st (options.generate_insertion ()); + for (NarrowStrings::const_iterator i (st.begin ()); i != st.end (); + ++i) { String stream_type ("::xsd::cxx::tree::ostream< " + *i + " >"); @@ -474,13 +476,13 @@ namespace CXX { if (ctx.polymorphic) { - Streams const& st (ctx.options.value ()); + NarrowStrings const& st (ctx.options.generate_insertion ()); ctx.os << "#include " << endl << endl; - Boolean import_maps (ctx.options.value ()); - Boolean export_maps (ctx.options.value ()); + Boolean import_maps (ctx.options.import_maps ()); + Boolean export_maps (ctx.options.export_maps ()); if (import_maps || export_maps) { @@ -493,7 +495,8 @@ namespace CXX << "namespace tree" << "{"; - for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i) + for (NarrowStrings::const_iterator i (st.begin ()); i != st.end (); + ++i) { String stream (*i); @@ -531,7 +534,8 @@ namespace CXX << "{"; UnsignedLong n (0); - for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i) + for (NarrowStrings::const_iterator i (st.begin ()); i != st.end (); + ++i) { String stream (*i); -- cgit v1.1