aboutsummaryrefslogtreecommitdiff
path: root/xsd/cxx/parser/generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/cxx/parser/generator.cxx')
-rw-r--r--xsd/cxx/parser/generator.cxx36
1 files changed, 21 insertions, 15 deletions
diff --git a/xsd/cxx/parser/generator.cxx b/xsd/cxx/parser/generator.cxx
index 46a0687..58e7043 100644
--- a/xsd/cxx/parser/generator.cxx
+++ b/xsd/cxx/parser/generator.cxx
@@ -787,18 +787,6 @@ namespace CXX
<< endl;
}
- // Version check.
- //
- hxx << "#include <xsd/cxx/config.hxx>" << endl
- << endl
- << "#if (XSD_INT_VERSION != " << XSD_INT_VERSION << "L)" << endl
- << "#error XSD runtime version mismatch" << endl
- << "#endif" << endl
- << endl;
-
- hxx << "#include <xsd/cxx/pre.hxx>" << endl
- << endl;
-
// Copy prologue.
//
hxx << "// Begin prologue." << endl
@@ -811,6 +799,18 @@ namespace CXX
<< "// End prologue." << endl
<< endl;
+ // Version check.
+ //
+ hxx << "#include <xsd/cxx/config.hxx>" << endl
+ << endl
+ << "#if (XSD_INT_VERSION != " << XSD_INT_VERSION << "L)" << endl
+ << "#error XSD runtime version mismatch" << endl
+ << "#endif" << endl
+ << endl;
+
+ hxx << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
// Generate.
//
{
@@ -825,6 +825,9 @@ namespace CXX
if (inline_)
hxx << "#include " << ctx.process_include_path (ixx_name) << endl;
+ hxx << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
// Copy epilogue.
//
hxx << "// Begin epilogue." << endl
@@ -837,9 +840,6 @@ namespace CXX
<< "// End epilogue." << endl
<< endl;
- hxx << "#include <xsd/cxx/post.hxx>" << endl
- << endl;
-
hxx << "#endif // " << guard << endl;
if (show_sloc)
@@ -929,6 +929,9 @@ namespace CXX
<< "// End prologue." << endl
<< endl;
+ cxx << "#include <xsd/cxx/pre.hxx>" << endl
+ << endl;
+
cxx << "#include " << ctx.process_include_path (hxx_name) << endl
<< endl;
@@ -950,6 +953,9 @@ namespace CXX
}
}
+ cxx << "#include <xsd/cxx/post.hxx>" << endl
+ << endl;
+
// Copy epilogue.
//
cxx << "// Begin epilogue." << endl