diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-02-22 14:44:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-02-22 14:44:30 +0200 |
commit | 2c0a77a8f4565b6ef76c32b970df48369b3d0456 (patch) | |
tree | 6c8d18b27efa644cf852cfdb42158864895ac5b9 /xsd/cxx/tree/stream-insertion-source.cxx | |
parent | 5a2282e394b4049d3db96c2c28e8622e7193a014 (diff) |
Add support for excluding export code from compilation
Affected options: --generate-xml-schema, --export-maps,
--import-maps. New macros: XSD_NO_EXPORT, XSD_MAP_VISIBILITY.
Reorder template arguments for the idref type.
Diffstat (limited to 'xsd/cxx/tree/stream-insertion-source.cxx')
-rw-r--r-- | xsd/cxx/tree/stream-insertion-source.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xsd/cxx/tree/stream-insertion-source.cxx b/xsd/cxx/tree/stream-insertion-source.cxx index ae58dcc..1ab21e7 100644 --- a/xsd/cxx/tree/stream-insertion-source.cxx +++ b/xsd/cxx/tree/stream-insertion-source.cxx @@ -448,7 +448,9 @@ namespace CXX if (import_maps || export_maps) { - ctx.os << "namespace xsd" + ctx.os << "#ifndef XSD_NO_EXPORT" << endl + << endl + << "namespace xsd" << "{" << "namespace cxx" << "{" @@ -475,12 +477,18 @@ namespace CXX << "template struct __attribute__ ((visibility(\"default\"))) " << "stream_insertion_plate< 0, " << stream << ", " << ctx.char_type << " >;" + << "#elif defined(XSD_MAP_VISIBILITY)" << endl + << "template struct XSD_MAP_VISIBILITY " << + "stream_insertion_plate< 0, " << stream << ", " << + ctx.char_type << " >;" << "#endif" << endl; } ctx.os << "}" // tree << "}" // cxx - << "}"; // xsd + << "}" // xsd + << "#endif // XSD_NO_EXPORT" << endl + << endl; } ctx.os << "namespace _xsd" |