summaryrefslogtreecommitdiff
path: root/xsd/cxx/tree/stream-source.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-04-11 16:47:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-11 16:47:17 +0200
commitbda619aa6ace8ed83d9888ea78f15c7c313c2044 (patch)
treeddaa22c35adb093f08ba5057069bb92690b8a6c0 /xsd/cxx/tree/stream-source.cxx
parentf7f415cfca286078d373960c77e4798cd4078ccf (diff)
Add support for polymorphic map plates
Diffstat (limited to 'xsd/cxx/tree/stream-source.cxx')
-rw-r--r--xsd/cxx/tree/stream-source.cxx36
1 files changed, 20 insertions, 16 deletions
diff --git a/xsd/cxx/tree/stream-source.cxx b/xsd/cxx/tree/stream-source.cxx
index 77cfa81..a070ae7 100644
--- a/xsd/cxx/tree/stream-source.cxx
+++ b/xsd/cxx/tree/stream-source.cxx
@@ -61,8 +61,8 @@ namespace CXX
String const& name (ename (l));
os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< 0, " <<
- char_type << ", " << name << " >" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
<< "_xsd_" << name << "_std_ostream_init;"
<< endl;
}
@@ -118,8 +118,8 @@ namespace CXX
String const& name (ename (u));
os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< 0, " <<
- char_type << ", " << name << " >" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
<< "_xsd_" << name << "_std_ostream_init;"
<< endl;
}
@@ -198,8 +198,8 @@ namespace CXX
String const& name (ename (e));
os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< 0, " <<
- char_type << ", " << name << " >" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
<< "_xsd_" << name << "_std_ostream_init;"
<< endl;
}
@@ -241,8 +241,8 @@ namespace CXX
os << "{"
<< "::xsd::cxx::tree::std_ostream_map< " << char_type
<< " >& om (" << endl
- << "::xsd::cxx::tree::std_ostream_map_instance< 0, " <<
- char_type << " > ());"
+ << "::xsd::cxx::tree::std_ostream_map_instance< " <<
+ poly_plate << ", " << char_type << " > ());"
<< endl;
}
@@ -395,8 +395,8 @@ namespace CXX
String const& name (ename (c));
os << "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_initializer< 0, " <<
- char_type << ", " << name << " >" << endl
+ << "const ::xsd::cxx::tree::std_ostream_initializer< " <<
+ poly_plate << ", " << char_type << ", " << name << " >" << endl
<< "_xsd_" << name << "_std_ostream_init;"
<< endl;
}
@@ -438,19 +438,23 @@ namespace CXX
if (export_maps)
ctx.os << "template struct __declspec (dllexport) " <<
- "std_ostream_plate< 0, " << ctx.char_type << " >;";
+ "std_ostream_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
if (import_maps)
ctx.os << "template struct __declspec (dllimport) " <<
- "std_ostream_plate< 0, " << ctx.char_type << " >;";
+ "std_ostream_plate< " << ctx.poly_plate << ", " <<
+ ctx.char_type << " >;";
ctx.os << "#elif defined(__GNUC__) && __GNUC__ >= 4" << endl
<< "template struct __attribute__ ((visibility(\"default\"))) " <<
- "std_ostream_plate< 0, " << ctx.char_type << " >;";
+ "std_ostream_plate< " << ctx.poly_plate << ", " << ctx.char_type <<
+ " >;";
ctx.os << "#elif defined(XSD_MAP_VISIBILITY)" << endl
<< "template struct XSD_MAP_VISIBILITY " <<
- "std_ostream_plate< 0, " << ctx.char_type << " >;";
+ "std_ostream_plate< " << ctx.poly_plate << ", " << ctx.char_type <<
+ " >;";
ctx.os << "#endif" << endl
<< "}" // tree
@@ -463,8 +467,8 @@ namespace CXX
ctx.os << "namespace _xsd"
<< "{"
<< "static" << endl
- << "const ::xsd::cxx::tree::std_ostream_plate< 0, " <<
- ctx.char_type << " >" << endl
+ << "const ::xsd::cxx::tree::std_ostream_plate< " <<
+ ctx.poly_plate << ", " << ctx.char_type << " >" << endl
<< "std_ostream_plate_init;"
<< "}";
}