diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-06-21 10:33:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-06-21 10:41:12 +0200 |
commit | e6181e6a87a5e38e4e02b09f855d37fd882ae513 (patch) | |
tree | 4d4e00e5453affca985264604cf292093955c58e /odb/generator.cxx | |
parent | 617407a3353e5bfce0dc9144776015899d7a4e65 (diff) |
Various bug fixes for dynamic multi-database support
Diffstat (limited to 'odb/generator.cxx')
-rw-r--r-- | odb/generator.cxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/odb/generator.cxx b/odb/generator.cxx index d5ead7c..6bdd594 100644 --- a/odb/generator.cxx +++ b/odb/generator.cxx @@ -499,19 +499,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: @@ -660,6 +662,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; @@ -670,12 +678,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: |