summaryrefslogtreecommitdiff
path: root/xsd/cxx/tree/stream-extraction-source.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/cxx/tree/stream-extraction-source.cxx')
-rw-r--r--xsd/cxx/tree/stream-extraction-source.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/xsd/cxx/tree/stream-extraction-source.cxx b/xsd/cxx/tree/stream-extraction-source.cxx
index fe9e31f..39c5994 100644
--- a/xsd/cxx/tree/stream-extraction-source.cxx
+++ b/xsd/cxx/tree/stream-extraction-source.cxx
@@ -676,7 +676,9 @@ namespace CXX
if (import_maps || export_maps)
{
- ctx.os << "namespace xsd"
+ ctx.os << "#ifndef XSD_NO_EXPORT" << endl
+ << endl
+ << "namespace xsd"
<< "{"
<< "namespace cxx"
<< "{"
@@ -703,12 +705,19 @@ namespace CXX
<< "template struct __attribute__ ((visibility(\"default\"))) " <<
"stream_extraction_plate< 0, " << stream << ", " <<
ctx.char_type << " >;"
+ << "#elif defined(XSD_MAP_VISIBILITY)" << endl
+ << "template struct XSD_MAP_VISIBILITY " <<
+ "stream_extraction_plate< 0, " << stream << ", " <<
+ ctx.char_type << " >;"
<< "#endif" << endl;
}
ctx.os << "}" // tree
<< "}" // cxx
- << "}"; // xsd
+ << "}" // xsd
+ << "#endif // XSD_NO_EXPORT" << endl
+ << endl;
+
}
ctx.os << "namespace _xsd"