summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-03 14:07:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-03 14:07:56 +0200
commit9b3c2d9d25d9c0213ef0af58c285d2713a020c8b (patch)
treec270cbe2f4e80d21dd2191a26d1b93aeb4375773
parent6aab653d6975b92c11eef1b56f025c11e6d8e612 (diff)
Generated code infrastructure
Add prologue/epilogue support, version check, and pre/post inclusion.
-rw-r--r--odb/generator.cxx99
-rw-r--r--odb/options.cli114
-rw-r--r--odb/options.cxx262
-rw-r--r--odb/options.hxx128
-rw-r--r--odb/options.ixx192
5 files changed, 793 insertions, 2 deletions
diff --git a/odb/generator.cxx b/odb/generator.cxx
index ce5b1cb..0c684ea 100644
--- a/odb/generator.cxx
+++ b/odb/generator.cxx
@@ -14,6 +14,7 @@
#include <cutl/compiler/code-stream.hxx>
#include <cutl/compiler/cxx-indenter.hxx>
+#include <odb/version.hxx>
#include <odb/context.hxx>
#include <odb/generator.hxx>
@@ -74,6 +75,23 @@ namespace
throw generator::failed ();
}
}
+
+ void
+ append (ostream& os, vector<string> const& text, string const& file)
+ {
+ for (vector<string>::const_iterator i (text.begin ());
+ i != text.end (); ++i)
+ {
+ os << *i << endl;
+ }
+
+ if (!file.empty ())
+ {
+ ifstream ifs;
+ open (ifs, file);
+ os << ifs.rdbuf ();
+ }
+ }
}
generator::
@@ -215,6 +233,27 @@ generate (options const& ops, semantics::unit& unit, path const& p)
<< "#define " << guard << endl
<< endl;
+ // Copy prologue.
+ //
+ hxx << "// Begin prologue." << endl
+ << "//" << endl;
+ append (hxx, ops.hxx_prologue (), ops.hxx_prologue_file ());
+ hxx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ // Version check.
+ //
+ hxx << "#include <odb/version.hxx>" << endl
+ << endl
+ << "#if (ODB_VERSION != " << ODB_VERSION << "UL)" << endl
+ << "#error ODB runtime version mismatch" << endl
+ << "#endif" << endl
+ << endl;
+
+ hxx << "#include <odb/pre.hxx>" << endl
+ << endl;
+
hxx << "#include " << (br ? '<' : '"') << ip << file <<
(br ? '>' : '"') << endl
<< endl;
@@ -237,6 +276,18 @@ generate (options const& ops, semantics::unit& unit, path const& p)
(br ? '>' : '"') << endl
<< endl;
+ hxx << "#include <odb/post.hxx>" << endl
+ << endl;
+
+ // Copy epilogue.
+ //
+ hxx << "// Begin epilogue." << endl
+ << "//" << endl;
+ append (hxx, ops.hxx_epilogue (), ops.hxx_epilogue_file ());
+ hxx << "//" << endl
+ << "// End epilogue." << endl
+ << endl;
+
hxx << "#endif // " << guard << endl;
}
@@ -245,6 +296,15 @@ generate (options const& ops, semantics::unit& unit, path const& p)
{
cxx_filter filt (ixx);
+ // Copy prologue.
+ //
+ ixx << "// Begin prologue." << endl
+ << "//" << endl;
+ append (ixx, ops.ixx_prologue (), ops.ixx_prologue_file ());
+ ixx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
switch (ops.database ())
{
case database::mysql:
@@ -260,6 +320,14 @@ generate (options const& ops, semantics::unit& unit, path const& p)
break;
}
}
+
+ // Copy epilogue.
+ //
+ ixx << "// Begin epilogue." << endl
+ << "//" << endl;
+ append (ixx, ops.ixx_epilogue (), ops.ixx_epilogue_file ());
+ ixx << "//" << endl
+ << "// End epilogue." << endl;
}
// CXX
@@ -267,6 +335,18 @@ generate (options const& ops, semantics::unit& unit, path const& p)
{
cxx_filter filt (cxx);
+ // Copy prologue.
+ //
+ cxx << "// Begin prologue." << endl
+ << "//" << endl;
+ append (cxx, ops.cxx_prologue (), ops.cxx_prologue_file ());
+ cxx << "//" << endl
+ << "// End prologue." << endl
+ << endl;
+
+ cxx << "#include <odb/pre.hxx>" << endl
+ << endl;
+
cxx << "#include " << (br ? '<' : '"') << ip << hxx_name <<
(br ? '>' : '"') << endl
<< endl;
@@ -286,12 +366,27 @@ generate (options const& ops, semantics::unit& unit, path const& p)
break;
}
}
+
+ cxx << "#include <odb/post.hxx>" << endl
+ << endl;
+
+ // Copy epilogue.
+ //
+ cxx << "// Begin epilogue." << endl
+ << "//" << endl;
+ append (cxx, ops.cxx_epilogue (), ops.cxx_epilogue_file ());
+ cxx << "//" << endl
+ << "// End epilogue." << endl;
}
// SQL
//
if (ops.generate_schema ())
{
+ // Copy prologue.
+ //
+ append (sql, ops.sql_prologue (), ops.sql_prologue_file ());
+
switch (ops.database ())
{
case database::mysql:
@@ -306,6 +401,10 @@ generate (options const& ops, semantics::unit& unit, path const& p)
throw failed ();
}
}
+
+ // Copy epilogue.
+ //
+ append (sql, ops.sql_epilogue (), ops.sql_epilogue_file ());
}
auto_rm.cancel ();
diff --git a/odb/options.cli b/odb/options.cli
index ebe65e5..6ac44e1 100644
--- a/odb/options.cli
+++ b/odb/options.cli
@@ -76,6 +76,120 @@ class options
the generated database schema file."
};
+ // Prologues.
+ //
+ std::vector<std::string> --hxx-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the generated C++ header file."
+ };
+
+ std::vector<std::string> --ixx-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the generated C++ inline file."
+ };
+
+ std::vector<std::string> --cxx-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the generated C++ source file."
+ };
+
+ std::vector<std::string> --sql-prologue
+ {
+ "<text>",
+ "Insert <text> at the beginning of the generated database schema file."
+ };
+
+ // Epilogues.
+ //
+ std::vector<std::string> --hxx-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the generated C++ header file."
+ };
+
+ std::vector<std::string> --ixx-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the generated C++ inline file."
+ };
+
+ std::vector<std::string> --cxx-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the generated C++ source file."
+ };
+
+ std::vector<std::string> --sql-epilogue
+ {
+ "<text>",
+ "Insert <text> at the end of the generated database schema file."
+ };
+
+ // Prologue files.
+ //
+ std::string --hxx-prologue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the beginning of the generated C++
+ header file."
+ };
+
+ std::string --ixx-prologue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the beginning of the generated C++
+ inline file."
+ };
+
+ std::string --cxx-prologue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the beginning of the generated C++
+ source file."
+ };
+
+ std::string --sql-prologue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the beginning of the generated
+ database schema file."
+ };
+
+ // Epilogue files.
+ //
+ std::string --hxx-epilogue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the end of the generated C++ header
+ file."
+ };
+
+ std::string --ixx-epilogue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the end of the generated C++ inline
+ file."
+ };
+
+ std::string --cxx-epilogue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the end of the generated C++ source
+ file."
+ };
+
+ std::string --sql-epilogue-file
+ {
+ "<file>",
+ "Insert the content of <file> at the end of the generated database
+ schema file."
+ };
+
+ // Include options.
+ //
bool --include-with-brackets
{
"Use angle brackets (<>) instead of quotes (\"\") in the generated
diff --git a/odb/options.cxx b/odb/options.cxx
index 2af4e8e..f426f7c 100644
--- a/odb/options.cxx
+++ b/odb/options.cxx
@@ -429,7 +429,8 @@ namespace cli
parse (std::vector<X>& c, bool& xs, scanner& s)
{
X x;
- parser<X>::parse (x, s);
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
c.push_back (x);
xs = true;
}
@@ -442,7 +443,8 @@ namespace cli
parse (std::set<X>& c, bool& xs, scanner& s)
{
X x;
- parser<X>::parse (x, s);
+ bool dummy;
+ parser<X>::parse (x, dummy, s);
c.insert (x);
xs = true;
}
@@ -552,6 +554,38 @@ options (int& argc,
cxx_suffix_specified_ (false),
sql_suffix_ (".sql"),
sql_suffix_specified_ (false),
+ hxx_prologue_ (),
+ hxx_prologue_specified_ (false),
+ ixx_prologue_ (),
+ ixx_prologue_specified_ (false),
+ cxx_prologue_ (),
+ cxx_prologue_specified_ (false),
+ sql_prologue_ (),
+ sql_prologue_specified_ (false),
+ hxx_epilogue_ (),
+ hxx_epilogue_specified_ (false),
+ ixx_epilogue_ (),
+ ixx_epilogue_specified_ (false),
+ cxx_epilogue_ (),
+ cxx_epilogue_specified_ (false),
+ sql_epilogue_ (),
+ sql_epilogue_specified_ (false),
+ hxx_prologue_file_ (),
+ hxx_prologue_file_specified_ (false),
+ ixx_prologue_file_ (),
+ ixx_prologue_file_specified_ (false),
+ cxx_prologue_file_ (),
+ cxx_prologue_file_specified_ (false),
+ sql_prologue_file_ (),
+ sql_prologue_file_specified_ (false),
+ hxx_epilogue_file_ (),
+ hxx_epilogue_file_specified_ (false),
+ ixx_epilogue_file_ (),
+ ixx_epilogue_file_specified_ (false),
+ cxx_epilogue_file_ (),
+ cxx_epilogue_file_specified_ (false),
+ sql_epilogue_file_ (),
+ sql_epilogue_file_specified_ (false),
include_with_brackets_ (),
include_prefix_ (),
include_prefix_specified_ (false),
@@ -591,6 +625,38 @@ options (int start,
cxx_suffix_specified_ (false),
sql_suffix_ (".sql"),
sql_suffix_specified_ (false),
+ hxx_prologue_ (),
+ hxx_prologue_specified_ (false),
+ ixx_prologue_ (),
+ ixx_prologue_specified_ (false),
+ cxx_prologue_ (),
+ cxx_prologue_specified_ (false),
+ sql_prologue_ (),
+ sql_prologue_specified_ (false),
+ hxx_epilogue_ (),
+ hxx_epilogue_specified_ (false),
+ ixx_epilogue_ (),
+ ixx_epilogue_specified_ (false),
+ cxx_epilogue_ (),
+ cxx_epilogue_specified_ (false),
+ sql_epilogue_ (),
+ sql_epilogue_specified_ (false),
+ hxx_prologue_file_ (),
+ hxx_prologue_file_specified_ (false),
+ ixx_prologue_file_ (),
+ ixx_prologue_file_specified_ (false),
+ cxx_prologue_file_ (),
+ cxx_prologue_file_specified_ (false),
+ sql_prologue_file_ (),
+ sql_prologue_file_specified_ (false),
+ hxx_epilogue_file_ (),
+ hxx_epilogue_file_specified_ (false),
+ ixx_epilogue_file_ (),
+ ixx_epilogue_file_specified_ (false),
+ cxx_epilogue_file_ (),
+ cxx_epilogue_file_specified_ (false),
+ sql_epilogue_file_ (),
+ sql_epilogue_file_specified_ (false),
include_with_brackets_ (),
include_prefix_ (),
include_prefix_specified_ (false),
@@ -630,6 +696,38 @@ options (int& argc,
cxx_suffix_specified_ (false),
sql_suffix_ (".sql"),
sql_suffix_specified_ (false),
+ hxx_prologue_ (),
+ hxx_prologue_specified_ (false),
+ ixx_prologue_ (),
+ ixx_prologue_specified_ (false),
+ cxx_prologue_ (),
+ cxx_prologue_specified_ (false),
+ sql_prologue_ (),
+ sql_prologue_specified_ (false),
+ hxx_epilogue_ (),
+ hxx_epilogue_specified_ (false),
+ ixx_epilogue_ (),
+ ixx_epilogue_specified_ (false),
+ cxx_epilogue_ (),
+ cxx_epilogue_specified_ (false),
+ sql_epilogue_ (),
+ sql_epilogue_specified_ (false),
+ hxx_prologue_file_ (),
+ hxx_prologue_file_specified_ (false),
+ ixx_prologue_file_ (),
+ ixx_prologue_file_specified_ (false),
+ cxx_prologue_file_ (),
+ cxx_prologue_file_specified_ (false),
+ sql_prologue_file_ (),
+ sql_prologue_file_specified_ (false),
+ hxx_epilogue_file_ (),
+ hxx_epilogue_file_specified_ (false),
+ ixx_epilogue_file_ (),
+ ixx_epilogue_file_specified_ (false),
+ cxx_epilogue_file_ (),
+ cxx_epilogue_file_specified_ (false),
+ sql_epilogue_file_ (),
+ sql_epilogue_file_specified_ (false),
include_with_brackets_ (),
include_prefix_ (),
include_prefix_specified_ (false),
@@ -671,6 +769,38 @@ options (int start,
cxx_suffix_specified_ (false),
sql_suffix_ (".sql"),
sql_suffix_specified_ (false),
+ hxx_prologue_ (),
+ hxx_prologue_specified_ (false),
+ ixx_prologue_ (),
+ ixx_prologue_specified_ (false),
+ cxx_prologue_ (),
+ cxx_prologue_specified_ (false),
+ sql_prologue_ (),
+ sql_prologue_specified_ (false),
+ hxx_epilogue_ (),
+ hxx_epilogue_specified_ (false),
+ ixx_epilogue_ (),
+ ixx_epilogue_specified_ (false),
+ cxx_epilogue_ (),
+ cxx_epilogue_specified_ (false),
+ sql_epilogue_ (),
+ sql_epilogue_specified_ (false),
+ hxx_prologue_file_ (),
+ hxx_prologue_file_specified_ (false),
+ ixx_prologue_file_ (),
+ ixx_prologue_file_specified_ (false),
+ cxx_prologue_file_ (),
+ cxx_prologue_file_specified_ (false),
+ sql_prologue_file_ (),
+ sql_prologue_file_specified_ (false),
+ hxx_epilogue_file_ (),
+ hxx_epilogue_file_specified_ (false),
+ ixx_epilogue_file_ (),
+ ixx_epilogue_file_specified_ (false),
+ cxx_epilogue_file_ (),
+ cxx_epilogue_file_specified_ (false),
+ sql_epilogue_file_ (),
+ sql_epilogue_file_specified_ (false),
include_with_brackets_ (),
include_prefix_ (),
include_prefix_specified_ (false),
@@ -708,6 +838,38 @@ options (::cli::scanner& s,
cxx_suffix_specified_ (false),
sql_suffix_ (".sql"),
sql_suffix_specified_ (false),
+ hxx_prologue_ (),
+ hxx_prologue_specified_ (false),
+ ixx_prologue_ (),
+ ixx_prologue_specified_ (false),
+ cxx_prologue_ (),
+ cxx_prologue_specified_ (false),
+ sql_prologue_ (),
+ sql_prologue_specified_ (false),
+ hxx_epilogue_ (),
+ hxx_epilogue_specified_ (false),
+ ixx_epilogue_ (),
+ ixx_epilogue_specified_ (false),
+ cxx_epilogue_ (),
+ cxx_epilogue_specified_ (false),
+ sql_epilogue_ (),
+ sql_epilogue_specified_ (false),
+ hxx_prologue_file_ (),
+ hxx_prologue_file_specified_ (false),
+ ixx_prologue_file_ (),
+ ixx_prologue_file_specified_ (false),
+ cxx_prologue_file_ (),
+ cxx_prologue_file_specified_ (false),
+ sql_prologue_file_ (),
+ sql_prologue_file_specified_ (false),
+ hxx_epilogue_file_ (),
+ hxx_epilogue_file_specified_ (false),
+ ixx_epilogue_file_ (),
+ ixx_epilogue_file_specified_ (false),
+ cxx_epilogue_file_ (),
+ cxx_epilogue_file_specified_ (false),
+ sql_epilogue_file_ (),
+ sql_epilogue_file_specified_ (false),
include_with_brackets_ (),
include_prefix_ (),
include_prefix_specified_ (false),
@@ -752,6 +914,54 @@ print_usage (::std::ostream& os)
<< " construct the name of the generated database schema" << ::std::endl
<< " file." << ::std::endl;
+ os << "--hxx-prologue <text> Insert <text> at the beginning of the generated C++" << ::std::endl
+ << " header file." << ::std::endl;
+
+ os << "--ixx-prologue <text> Insert <text> at the beginning of the generated C++" << ::std::endl
+ << " inline file." << ::std::endl;
+
+ os << "--cxx-prologue <text> Insert <text> at the beginning of the generated C++" << ::std::endl
+ << " source file." << ::std::endl;
+
+ os << "--sql-prologue <text> Insert <text> at the beginning of the generated" << ::std::endl
+ << " database schema file." << ::std::endl;
+
+ os << "--hxx-epilogue <text> Insert <text> at the end of the generated C++ header" << ::std::endl
+ << " file." << ::std::endl;
+
+ os << "--ixx-epilogue <text> Insert <text> at the end of the generated C++ inline" << ::std::endl
+ << " file." << ::std::endl;
+
+ os << "--cxx-epilogue <text> Insert <text> at the end of the generated C++ source" << ::std::endl
+ << " file." << ::std::endl;
+
+ os << "--sql-epilogue <text> Insert <text> at the end of the generated database" << ::std::endl
+ << " schema file." << ::std::endl;
+
+ os << "--hxx-prologue-file <file> Insert the content of <file> at the beginning of the" << ::std::endl
+ << " generated C++ header file." << ::std::endl;
+
+ os << "--ixx-prologue-file <file> Insert the content of <file> at the beginning of the" << ::std::endl
+ << " generated C++ inline file." << ::std::endl;
+
+ os << "--cxx-prologue-file <file> Insert the content of <file> at the beginning of the" << ::std::endl
+ << " generated C++ source file." << ::std::endl;
+
+ os << "--sql-prologue-file <file> Insert the content of <file> at the beginning of the" << ::std::endl
+ << " generated database schema file." << ::std::endl;
+
+ os << "--hxx-epilogue-file <file> Insert the content of <file> at the end of the" << ::std::endl
+ << " generated C++ header file." << ::std::endl;
+
+ os << "--ixx-epilogue-file <file> Insert the content of <file> at the end of the" << ::std::endl
+ << " generated C++ inline file." << ::std::endl;
+
+ os << "--cxx-epilogue-file <file> Insert the content of <file> at the end of the" << ::std::endl
+ << " generated C++ source file." << ::std::endl;
+
+ os << "--sql-epilogue-file <file> Insert the content of <file> at the end of the" << ::std::endl
+ << " generated database schema file." << ::std::endl;
+
os << "--include-with-brackets Use angle brackets (<>) instead of quotes (\"\") in the" << ::std::endl
<< " generated '#include' directives." << ::std::endl;
@@ -814,6 +1024,54 @@ struct _cli_options_map_init
_cli_options_map_["--sql-suffix"] =
&::cli::thunk< options, std::string, &options::sql_suffix_,
&options::sql_suffix_specified_ >;
+ _cli_options_map_["--hxx-prologue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::hxx_prologue_,
+ &options::hxx_prologue_specified_ >;
+ _cli_options_map_["--ixx-prologue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::ixx_prologue_,
+ &options::ixx_prologue_specified_ >;
+ _cli_options_map_["--cxx-prologue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::cxx_prologue_,
+ &options::cxx_prologue_specified_ >;
+ _cli_options_map_["--sql-prologue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::sql_prologue_,
+ &options::sql_prologue_specified_ >;
+ _cli_options_map_["--hxx-epilogue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::hxx_epilogue_,
+ &options::hxx_epilogue_specified_ >;
+ _cli_options_map_["--ixx-epilogue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::ixx_epilogue_,
+ &options::ixx_epilogue_specified_ >;
+ _cli_options_map_["--cxx-epilogue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::cxx_epilogue_,
+ &options::cxx_epilogue_specified_ >;
+ _cli_options_map_["--sql-epilogue"] =
+ &::cli::thunk< options, std::vector<std::string>, &options::sql_epilogue_,
+ &options::sql_epilogue_specified_ >;
+ _cli_options_map_["--hxx-prologue-file"] =
+ &::cli::thunk< options, std::string, &options::hxx_prologue_file_,
+ &options::hxx_prologue_file_specified_ >;
+ _cli_options_map_["--ixx-prologue-file"] =
+ &::cli::thunk< options, std::string, &options::ixx_prologue_file_,
+ &options::ixx_prologue_file_specified_ >;
+ _cli_options_map_["--cxx-prologue-file"] =
+ &::cli::thunk< options, std::string, &options::cxx_prologue_file_,
+ &options::cxx_prologue_file_specified_ >;
+ _cli_options_map_["--sql-prologue-file"] =
+ &::cli::thunk< options, std::string, &options::sql_prologue_file_,
+ &options::sql_prologue_file_specified_ >;
+ _cli_options_map_["--hxx-epilogue-file"] =
+ &::cli::thunk< options, std::string, &options::hxx_epilogue_file_,
+ &options::hxx_epilogue_file_specified_ >;
+ _cli_options_map_["--ixx-epilogue-file"] =
+ &::cli::thunk< options, std::string, &options::ixx_epilogue_file_,
+ &options::ixx_epilogue_file_specified_ >;
+ _cli_options_map_["--cxx-epilogue-file"] =
+ &::cli::thunk< options, std::string, &options::cxx_epilogue_file_,
+ &options::cxx_epilogue_file_specified_ >;
+ _cli_options_map_["--sql-epilogue-file"] =
+ &::cli::thunk< options, std::string, &options::sql_epilogue_file_,
+ &options::sql_epilogue_file_specified_ >;
_cli_options_map_["--include-with-brackets"] =
&::cli::thunk< options, bool, &options::include_with_brackets_ >;
_cli_options_map_["--include-prefix"] =
diff --git a/odb/options.hxx b/odb/options.hxx
index 21cc496..036b96a 100644
--- a/odb/options.hxx
+++ b/odb/options.hxx
@@ -369,6 +369,102 @@ class options
bool
sql_suffix_specified () const;
+ const std::vector<std::string>&
+ hxx_prologue () const;
+
+ bool
+ hxx_prologue_specified () const;
+
+ const std::vector<std::string>&
+ ixx_prologue () const;
+
+ bool
+ ixx_prologue_specified () const;
+
+ const std::vector<std::string>&
+ cxx_prologue () const;
+
+ bool
+ cxx_prologue_specified () const;
+
+ const std::vector<std::string>&
+ sql_prologue () const;
+
+ bool
+ sql_prologue_specified () const;
+
+ const std::vector<std::string>&
+ hxx_epilogue () const;
+
+ bool
+ hxx_epilogue_specified () const;
+
+ const std::vector<std::string>&
+ ixx_epilogue () const;
+
+ bool
+ ixx_epilogue_specified () const;
+
+ const std::vector<std::string>&
+ cxx_epilogue () const;
+
+ bool
+ cxx_epilogue_specified () const;
+
+ const std::vector<std::string>&
+ sql_epilogue () const;
+
+ bool
+ sql_epilogue_specified () const;
+
+ const std::string&
+ hxx_prologue_file () const;
+
+ bool
+ hxx_prologue_file_specified () const;
+
+ const std::string&
+ ixx_prologue_file () const;
+
+ bool
+ ixx_prologue_file_specified () const;
+
+ const std::string&
+ cxx_prologue_file () const;
+
+ bool
+ cxx_prologue_file_specified () const;
+
+ const std::string&
+ sql_prologue_file () const;
+
+ bool
+ sql_prologue_file_specified () const;
+
+ const std::string&
+ hxx_epilogue_file () const;
+
+ bool
+ hxx_epilogue_file_specified () const;
+
+ const std::string&
+ ixx_epilogue_file () const;
+
+ bool
+ ixx_epilogue_file_specified () const;
+
+ const std::string&
+ cxx_epilogue_file () const;
+
+ bool
+ cxx_epilogue_file_specified () const;
+
+ const std::string&
+ sql_epilogue_file () const;
+
+ bool
+ sql_epilogue_file_specified () const;
+
const bool&
include_with_brackets () const;
@@ -428,6 +524,38 @@ class options
bool cxx_suffix_specified_;
std::string sql_suffix_;
bool sql_suffix_specified_;
+ std::vector<std::string> hxx_prologue_;
+ bool hxx_prologue_specified_;
+ std::vector<std::string> ixx_prologue_;
+ bool ixx_prologue_specified_;
+ std::vector<std::string> cxx_prologue_;
+ bool cxx_prologue_specified_;
+ std::vector<std::string> sql_prologue_;
+ bool sql_prologue_specified_;
+ std::vector<std::string> hxx_epilogue_;
+ bool hxx_epilogue_specified_;
+ std::vector<std::string> ixx_epilogue_;
+ bool ixx_epilogue_specified_;
+ std::vector<std::string> cxx_epilogue_;
+ bool cxx_epilogue_specified_;
+ std::vector<std::string> sql_epilogue_;
+ bool sql_epilogue_specified_;
+ std::string hxx_prologue_file_;
+ bool hxx_prologue_file_specified_;
+ std::string ixx_prologue_file_;
+ bool ixx_prologue_file_specified_;
+ std::string cxx_prologue_file_;
+ bool cxx_prologue_file_specified_;
+ std::string sql_prologue_file_;
+ bool sql_prologue_file_specified_;
+ std::string hxx_epilogue_file_;
+ bool hxx_epilogue_file_specified_;
+ std::string ixx_epilogue_file_;
+ bool ixx_epilogue_file_specified_;
+ std::string cxx_epilogue_file_;
+ bool cxx_epilogue_file_specified_;
+ std::string sql_epilogue_file_;
+ bool sql_epilogue_file_specified_;
bool include_with_brackets_;
std::string include_prefix_;
bool include_prefix_specified_;
diff --git a/odb/options.ixx b/odb/options.ixx
index 9796a83..ea575c3 100644
--- a/odb/options.ixx
+++ b/odb/options.ixx
@@ -263,6 +263,198 @@ sql_suffix_specified () const
return this->sql_suffix_specified_;
}
+inline const std::vector<std::string>& options::
+hxx_prologue () const
+{
+ return this->hxx_prologue_;
+}
+
+inline bool options::
+hxx_prologue_specified () const
+{
+ return this->hxx_prologue_specified_;
+}
+
+inline const std::vector<std::string>& options::
+ixx_prologue () const
+{
+ return this->ixx_prologue_;
+}
+
+inline bool options::
+ixx_prologue_specified () const
+{
+ return this->ixx_prologue_specified_;
+}
+
+inline const std::vector<std::string>& options::
+cxx_prologue () const
+{
+ return this->cxx_prologue_;
+}
+
+inline bool options::
+cxx_prologue_specified () const
+{
+ return this->cxx_prologue_specified_;
+}
+
+inline const std::vector<std::string>& options::
+sql_prologue () const
+{
+ return this->sql_prologue_;
+}
+
+inline bool options::
+sql_prologue_specified () const
+{
+ return this->sql_prologue_specified_;
+}
+
+inline const std::vector<std::string>& options::
+hxx_epilogue () const
+{
+ return this->hxx_epilogue_;
+}
+
+inline bool options::
+hxx_epilogue_specified () const
+{
+ return this->hxx_epilogue_specified_;
+}
+
+inline const std::vector<std::string>& options::
+ixx_epilogue () const
+{
+ return this->ixx_epilogue_;
+}
+
+inline bool options::
+ixx_epilogue_specified () const
+{
+ return this->ixx_epilogue_specified_;
+}
+
+inline const std::vector<std::string>& options::
+cxx_epilogue () const
+{
+ return this->cxx_epilogue_;
+}
+
+inline bool options::
+cxx_epilogue_specified () const
+{
+ return this->cxx_epilogue_specified_;
+}
+
+inline const std::vector<std::string>& options::
+sql_epilogue () const
+{
+ return this->sql_epilogue_;
+}
+
+inline bool options::
+sql_epilogue_specified () const
+{
+ return this->sql_epilogue_specified_;
+}
+
+inline const std::string& options::
+hxx_prologue_file () const
+{
+ return this->hxx_prologue_file_;
+}
+
+inline bool options::
+hxx_prologue_file_specified () const
+{
+ return this->hxx_prologue_file_specified_;
+}
+
+inline const std::string& options::
+ixx_prologue_file () const
+{
+ return this->ixx_prologue_file_;
+}
+
+inline bool options::
+ixx_prologue_file_specified () const
+{
+ return this->ixx_prologue_file_specified_;
+}
+
+inline const std::string& options::
+cxx_prologue_file () const
+{
+ return this->cxx_prologue_file_;
+}
+
+inline bool options::
+cxx_prologue_file_specified () const
+{
+ return this->cxx_prologue_file_specified_;
+}
+
+inline const std::string& options::
+sql_prologue_file () const
+{
+ return this->sql_prologue_file_;
+}
+
+inline bool options::
+sql_prologue_file_specified () const
+{
+ return this->sql_prologue_file_specified_;
+}
+
+inline const std::string& options::
+hxx_epilogue_file () const
+{
+ return this->hxx_epilogue_file_;
+}
+
+inline bool options::
+hxx_epilogue_file_specified () const
+{
+ return this->hxx_epilogue_file_specified_;
+}
+
+inline const std::string& options::
+ixx_epilogue_file () const
+{
+ return this->ixx_epilogue_file_;
+}
+
+inline bool options::
+ixx_epilogue_file_specified () const
+{
+ return this->ixx_epilogue_file_specified_;
+}
+
+inline const std::string& options::
+cxx_epilogue_file () const
+{
+ return this->cxx_epilogue_file_;
+}
+
+inline bool options::
+cxx_epilogue_file_specified () const
+{
+ return this->cxx_epilogue_file_specified_;
+}
+
+inline const std::string& options::
+sql_epilogue_file () const
+{
+ return this->sql_epilogue_file_;
+}
+
+inline bool options::
+sql_epilogue_file_specified () const
+{
+ return this->sql_epilogue_file_specified_;
+}
+
inline const bool& options::
include_with_brackets () const
{