diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-01-23 12:45:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-01-23 12:45:15 +0200 |
commit | e13d287e56e812676627f14491f9c0052cc54282 (patch) | |
tree | fbce19a62371b1fe23309681f4c265450b26ae83 /doc/manual.xhtml | |
parent | 4bd152adf66b9cad1300df506f15d8bd5ee749e2 (diff) |
Add note on pragma file inclusion options
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r-- | doc/manual.xhtml | 27 |
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> |