aboutsummaryrefslogtreecommitdiff
path: root/odb/generator.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-06-21 10:33:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-06-21 11:25:15 +0200
commit8c31ee59d95356cb111bab1853eac3b35b451f01 (patch)
tree00d62089c7ea3e39f7e9d4968517a51562483036 /odb/generator.cxx
parent0efbd383bf4b9d6c1a884ff0249412567b329fce (diff)
Various bug fixes for dynamic multi-database support2.2.22.2
Diffstat (limited to 'odb/generator.cxx')
-rw-r--r--odb/generator.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/odb/generator.cxx b/odb/generator.cxx
index 4af66c4..ed37964 100644
--- a/odb/generator.cxx
+++ b/odb/generator.cxx
@@ -321,19 +321,21 @@ generate (options const& ops,
for (paths::const_iterator i (inputs.begin ()); i != inputs.end (); ++i)
hxx << "#include " <<
ctx->process_include_path (i->leaf ().string ()) << endl;
+
hxx << endl;
+ // There are no -odb.hxx includes if we are generating code for
+ // everything.
+ //
+ if (!ops.at_once ())
+ if (include::generate (true))
+ hxx << endl;
+
{
// We don't want to indent prologues/epilogues.
//
ind_filter ind (ctx->os);
- // There are no -odb.hxx includes if we are generating code for
- // everything.
- //
- if (!ops.at_once ())
- include::generate (true);
-
switch (db)
{
case database::common:
@@ -526,6 +528,12 @@ generate (options const& ops,
cxx << "#include " << ctx->process_include_path (hxx_name) << endl;
+ // There are no -odb.hxx includes if we are generating code for
+ // everything.
+ //
+ if (!ops.at_once ())
+ include::generate (false);
+
if (!impl_guard.empty ())
cxx << "#undef " << impl_guard << endl;
@@ -536,12 +544,6 @@ generate (options const& ops,
//
ind_filter ind (ctx->os);
- // There are no -odb.hxx includes if we are generating code for
- // everything.
- //
- if (!ops.at_once ())
- include::generate (false);
-
switch (db)
{
case database::common: