From 77d6727eddc64a95ccbdf87984e22270fce61b35 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 28 Nov 2012 13:47:35 +0200 Subject: Add support for DLL exporting of generated code New options: --export-symbol, --extern-symbol. --- odb/relational/header.cxx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'odb/relational/header.cxx') diff --git a/odb/relational/header.cxx b/odb/relational/header.cxx index 543e1ac..ff2679e 100644 --- a/odb/relational/header.cxx +++ b/odb/relational/header.cxx @@ -52,8 +52,8 @@ traverse_object (type& c) // object_traits_impl // os << "template <>" << endl - << "class access::object_traits_impl< " << type << ", id_" << db << - " >:" << endl + << "class " << exp << "access::object_traits_impl< " << type << ", " << + "id_" << db << " >:" << endl << " public access::object_traits< " << type << " >" << "{" << "public:" << endl; @@ -680,8 +680,8 @@ traverse_view (type& c) // view_traits_impl // os << "template <>" << endl - << "class access::view_traits_impl< " << type << ", id_" << - db << " >:" << endl + << "class " << exp << "access::view_traits_impl< " << type << ", " << + "id_" << db << " >:" << endl << " public access::view_traits< " << type << " >" << "{" << "public:" << endl; @@ -834,9 +834,13 @@ traverse_composite (type& c) os << "// " << class_name (c) << endl << "//" << endl; + // While composite_value_traits is not used directly by user code, we + // still need to export it if the generated code for the same database + // is split into several DLLs. + // os << "template <>" << endl - << "class access::composite_value_traits< " << type << ", " << - "id_" << db << " >" + << "class " << exp << "access::composite_value_traits< " << type << + ", id_" << db << " >" << "{" << "public:" << endl; -- cgit v1.1