aboutsummaryrefslogtreecommitdiff
path: root/odb/function-table.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-31 07:59:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-31 07:59:17 +0200
commit255473612bbf9e753fa83fd7ccfd6e498175f83a (patch)
tree45e22ed835fc0f0dcf41ff0c8699dcc131cda8c0 /odb/function-table.hxx
parent1c6d6e5ed99e80d057a710635325a79b8e3f73d2 (diff)
Add dynamic multi-database support excluding query
Diffstat (limited to 'odb/function-table.hxx')
-rw-r--r--odb/function-table.hxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/odb/function-table.hxx b/odb/function-table.hxx
new file mode 100644
index 0000000..b1e5987
--- /dev/null
+++ b/odb/function-table.hxx
@@ -0,0 +1,34 @@
+// file : odb/function-table.hxx
+// copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_FUNCTION_TABLE_HXX
+#define ODB_FUNCTION_TABLE_HXX
+
+#include <odb/pre.hxx>
+
+#include <odb/forward.hxx>
+
+namespace odb
+{
+ template <typename T, database_id DB>
+ struct function_table_entry
+ {
+ typedef access::object_traits_impl<T, id_default> default_traits;
+
+ function_table_entry (
+ const typename default_traits::function_table_type* t)
+ {
+ default_traits::function_table[DB] = t;
+ }
+
+ ~function_table_entry ()
+ {
+ default_traits::function_table[DB] = 0;
+ }
+ };
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_FUNCTION_TABLE_HXX