aboutsummaryrefslogtreecommitdiff
path: root/odb/generator.cxx
diff options
context:
space:
mode:
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: