diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-20 11:54:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-20 11:55:22 +0200 |
commit | c04f7d6ed04d62efafa79a87bcde6c5f62e95327 (patch) | |
tree | 500cc93aed55b0809fe04e5a0b7020d9045c65c5 /xsd/cxx/tree/stream-insertion-source.cxx | |
parent | e14a3f91e6e51430bf9c6978f44c7f46114793fb (diff) |
Completion of the CLI port
Diffstat (limited to 'xsd/cxx/tree/stream-insertion-source.cxx')
-rw-r--r-- | xsd/cxx/tree/stream-insertion-source.cxx | 34 |
1 files changed, 19 insertions, 15 deletions
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<NarrowString> 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<CLI::generate_insertion> ()); - 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<CLI::generate_insertion> ()); - 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<CLI::generate_insertion> ()); - 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<Traversal::Member> (c) || c.inherits_p ()); UnsignedLong n (0); - Streams const& st (options.value<CLI::generate_insertion> ()); - 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<CLI::generate_insertion> ()); + NarrowStrings const& st (ctx.options.generate_insertion ()); ctx.os << "#include <xsd/cxx/tree/stream-insertion-map.hxx>" << endl << endl; - Boolean import_maps (ctx.options.value<CLI::import_maps> ()); - Boolean export_maps (ctx.options.value<CLI::export_maps> ()); + 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); |