aboutsummaryrefslogtreecommitdiff
path: root/common/callback/test.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/callback/test.hxx')
-rw-r--r--common/callback/test.hxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/common/callback/test.hxx b/common/callback/test.hxx
new file mode 100644
index 0000000..274e2b5
--- /dev/null
+++ b/common/callback/test.hxx
@@ -0,0 +1,32 @@
+// file : common/callback/test.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef TEST_HXX
+#define TEST_HXX
+
+#include <odb/core.hxx>
+#include <odb/callback.hxx>
+
+#pragma db object callback(db_callback)
+struct object
+{
+ object (unsigned long id, unsigned long d): id_ (id), data (d), pobj (0) {}
+ object (): id_ (0) {};
+
+ #pragma db id
+ unsigned long id_;
+
+ unsigned long data;
+
+ object* pobj;
+
+ void
+ db_callback (odb::callback_event, odb::database&);
+
+ void
+ db_callback (odb::callback_event, odb::database&) const;
+};
+
+#endif // TEST_HXX