aboutsummaryrefslogtreecommitdiff
path: root/odb/tracer/transaction.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/tracer/transaction.hxx')
-rw-r--r--odb/tracer/transaction.hxx46
1 files changed, 46 insertions, 0 deletions
diff --git a/odb/tracer/transaction.hxx b/odb/tracer/transaction.hxx
new file mode 100644
index 0000000..2bcfa07
--- /dev/null
+++ b/odb/tracer/transaction.hxx
@@ -0,0 +1,46 @@
+// file : odb/tracer/transaction.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_TRACER_TRANSACTION_HXX
+#define ODB_TRACER_TRANSACTION_HXX
+
+#include <odb/transaction.hxx>
+
+namespace odb
+{
+ namespace tracer
+ {
+ class database;
+ class transaction_impl;
+
+ class transaction: public odb::transaction
+ {
+ public:
+ typedef odb::database database_type;
+
+ explicit
+ transaction (transaction_impl*);
+
+ // Return the database this transaction is on.
+ //
+ database_type&
+ database ();
+
+ // Return current transaction or throw if there is no transaction
+ // in effect.
+ //
+ static transaction&
+ current ();
+
+ public:
+ transaction_impl&
+ implementation ();
+ };
+ }
+}
+
+#include <odb/tracer/transaction.ixx>
+
+#endif // ODB_TRACER_TRANSACTION_HXX