aboutsummaryrefslogtreecommitdiff
path: root/xsd/cxx/tree/stream-extraction-source.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-06-20 11:54:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-06-20 11:55:22 +0200
commitc04f7d6ed04d62efafa79a87bcde6c5f62e95327 (patch)
tree500cc93aed55b0809fe04e5a0b7020d9045c65c5 /xsd/cxx/tree/stream-extraction-source.cxx
parente14a3f91e6e51430bf9c6978f44c7f46114793fb (diff)
Completion of the CLI port
Diffstat (limited to 'xsd/cxx/tree/stream-extraction-source.cxx')
-rw-r--r--xsd/cxx/tree/stream-extraction-source.cxx36
1 files changed, 20 insertions, 16 deletions
diff --git a/xsd/cxx/tree/stream-extraction-source.cxx b/xsd/cxx/tree/stream-extraction-source.cxx
index 293dba5..53eaa09 100644
--- a/xsd/cxx/tree/stream-extraction-source.cxx
+++ b/xsd/cxx/tree/stream-extraction-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_extraction> ());
- for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i)
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ());
+ i != st.end (); ++i)
{
os << name << "::" << endl
<< name << " (" << istream_type << "< " <<
@@ -117,8 +116,9 @@ namespace CXX
String const& base (xs_string_type);
UnsignedLong n (0);
- Streams const& st (options.value<CLI::generate_extraction> ());
- for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i)
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
{
os << name << "::" << endl
<< name << " (" << istream_type << "< " <<
@@ -194,8 +194,9 @@ namespace CXX
value = evalue (e);
UnsignedLong n (0);
- Streams const& st (options.value<CLI::generate_extraction> ());
- for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i)
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
{
os << name << "::" << endl
<< name << " (" << istream_type << "< " <<
@@ -560,7 +561,7 @@ namespace CXX
inherits_ >> base_;
names_ctor_member_ >> ctor_member_;
- if (options.value<CLI::generate_wildcard> ())
+ if (options.generate_wildcard ())
names_ctor_member_ >> ctor_any_;
}
@@ -596,8 +597,9 @@ namespace CXX
}
UnsignedLong n (0);
- Streams const& st (options.value<CLI::generate_extraction> ());
- for (Streams::ConstIterator i (st.begin ()); i != st.end (); ++i)
+ NarrowStrings const& st (options.generate_extraction ());
+ for (NarrowStrings::const_iterator i (st.begin ()); i != st.end ();
+ ++i)
{
os << name << "::" << endl
@@ -699,13 +701,13 @@ namespace CXX
{
if (ctx.polymorphic)
{
- Streams const& st (ctx.options.value<CLI::generate_extraction> ());
+ NarrowStrings const& st (ctx.options.generate_extraction ());
ctx.os << "#include <xsd/cxx/tree/stream-extraction-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)
{
@@ -718,7 +720,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);
@@ -757,7 +760,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);