From e13d287e56e812676627f14491f9c0052cc54282 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 23 Jan 2011 12:45:15 +0200 Subject: Add note on pragma file inclusion options --- doc/manual.xhtml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'doc') 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: }; +

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 #include + directive, for example:

+ +
+// person.hxx
+
+class person
+{
+  ...
+};
+
+#ifdef ODB_COMPILER
+#  include "person-pragmas.hxx"
+#endif
+  
+ +

Alternatively, instead of using the #include directive, + we can use the --odb-epilogue option to make the pragmas + known to the ODB compiler when compiling the original header file, + for example:

+ +
+--odb-epilogue  '#include "person-pragmas.hxx"'
+  
+

The following three sections cover the specifiers applicable to the object, value, and member qualifiers.

-- cgit v1.1