aboutsummaryrefslogtreecommitdiff
path: root/odb/header.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-03-21 08:36:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-23 16:50:56 +0200
commit8d89bf37dd4ef3cb7373e1841ff57a53916fff0d (patch)
tree704b7de0338eba0e008a96a09b6d57e86846d1b1 /odb/header.cxx
parent68ff21c56fb287790440208907ad2a851a108f89 (diff)
Polymorphic inheritance support
Diffstat (limited to 'odb/header.cxx')
-rw-r--r--odb/header.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/odb/header.cxx b/odb/header.cxx
index d316036..a2b3b96 100644
--- a/odb/header.cxx
+++ b/odb/header.cxx
@@ -31,14 +31,12 @@ namespace header
// the latter is just a using-declaration for the former. To resolve
// this we will include TR1 traits if the Boost TR1 header is included.
//
- if (ctx.unit.count ("tr1-pointer-used") &&
- ctx.unit.get<bool> ("tr1-pointer-used"))
+ if (ctx.features.tr1_pointer)
{
os << "#include <odb/tr1/wrapper-traits.hxx>" << endl
<< "#include <odb/tr1/pointer-traits.hxx>" << endl;
}
- else if (ctx.unit.count ("boost-pointer-used") &&
- ctx.unit.get<bool> ("boost-pointer-used"))
+ else if (ctx.features.boost_pointer)
{
os << "#ifdef BOOST_TR1_MEMORY_HPP_INCLUDED" << endl
<< "# include <odb/tr1/wrapper-traits.hxx>" << endl
@@ -48,9 +46,26 @@ namespace header
os << "#include <odb/container-traits.hxx>" << endl;
+ if (ctx.features.polymorphic_object)
+ os << "#include <odb/polymorphic-info.hxx>" << endl;
+
if (ctx.options.generate_query ())
+ {
os << "#include <odb/result.hxx>" << endl;
+ if (ctx.features.simple_object)
+ os << "#include <odb/simple-object-result.hxx>" << endl;
+
+ if (ctx.features.polymorphic_object)
+ os << "#include <odb/polymorphic-object-result.hxx>" << endl;
+
+ if (ctx.features.no_id_object)
+ os << "#include <odb/no-id-object-result.hxx>" << endl;
+
+ if (ctx.features.view)
+ os << "#include <odb/view-result.hxx>" << endl;
+ }
+
os << endl;
}
}