diff options
Diffstat (limited to 'xsd/xsd/cxx/tree/stream-insertion-header.cxx')
-rw-r--r-- | xsd/xsd/cxx/tree/stream-insertion-header.cxx | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/xsd/xsd/cxx/tree/stream-insertion-header.cxx b/xsd/xsd/cxx/tree/stream-insertion-header.cxx index 1669fdd..e9ee438 100644 --- a/xsd/xsd/cxx/tree/stream-insertion-header.cxx +++ b/xsd/xsd/cxx/tree/stream-insertion-header.cxx @@ -1,6 +1,5 @@ // file : xsd/cxx/tree/stream-insertion-header.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/stream-insertion-header.hxx> @@ -14,8 +13,6 @@ namespace CXX { namespace { - typedef Containers::Vector<NarrowString> Streams; - struct List: Traversal::List, Context { List (Context& c) @@ -23,7 +20,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& l) { String name (ename (l)); @@ -34,8 +31,9 @@ namespace CXX if (renamed_type (l, name) && !name) return; - 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 (ostream_type + L"< " + String (*i) + L" >"); @@ -56,7 +54,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& u) { String name (ename (u)); @@ -67,8 +65,9 @@ namespace CXX if (renamed_type (u, name) && !name) return; - 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 (ostream_type + L"< " + String (*i) + L" >"); @@ -89,7 +88,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& e) { String name (ename (e)); @@ -100,8 +99,9 @@ namespace CXX if (renamed_type (e, name) && !name) return; - 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 (ostream_type + L"< " + String (*i) + L" >"); @@ -121,7 +121,7 @@ namespace CXX { } - virtual Void + virtual void traverse (Type& c) { String name (ename (c)); @@ -132,8 +132,9 @@ namespace CXX if (renamed_type (c, name) && !name) return; - 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 (ostream_type + L"< " + String (*i) + L" >"); @@ -147,14 +148,14 @@ namespace CXX }; } - Void + void generate_stream_insertion_header (Context& ctx) { String c (ctx.char_type); Traversal::Schema schema; - Traversal::Sources sources; + Sources sources; Traversal::Names names_ns, names; Namespace ns (ctx); |