summaryrefslogtreecommitdiff
path: root/doc/manual.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r--doc/manual.xhtml27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/manual.xhtml b/doc/manual.xhtml
index 0bee542..deb2bd8 100644
--- a/doc/manual.xhtml
+++ b/doc/manual.xhtml
@@ -5118,6 +5118,33 @@ private:
};
</pre>
+ <p>If we would like to factor the ODB pragmas into a separate file,
+ we can include this file into the original header file (the one
+ that defines the persistent types) using the <code>#include</code>
+ directive, for example:</p>
+
+ <pre class="c++">
+// person.hxx
+
+class person
+{
+ ...
+};
+
+#ifdef ODB_COMPILER
+# include "person-pragmas.hxx"
+#endif
+ </pre>
+
+ <p>Alternatively, instead of using the <code>#include</code> directive,
+ we can use the <code>--odb-epilogue</code> option to make the pragmas
+ known to the ODB compiler when compiling the original header file,
+ for example:</p>
+
+ <pre class="terminal">
+--odb-epilogue '#include "person-pragmas.hxx"'
+ </pre>
+
<p>The following three sections cover the specifiers applicable
to the <code>object</code>, <code>value</code>, and <code>member</code>
qualifiers.</p>