diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-06-04 16:36:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-06-04 16:36:21 +0200 |
commit | eef022894e7d6f1f371da432722a733b98fd8709 (patch) | |
tree | 23c42ae76accab7708b73efc98b210b87bc9b1ab /odb/tracer/transaction.ixx | |
parent | 0b5578e85153c43374f022a0454bbb41288da52c (diff) |
Initial implementation
Diffstat (limited to 'odb/tracer/transaction.ixx')
-rw-r--r-- | odb/tracer/transaction.ixx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/odb/tracer/transaction.ixx b/odb/tracer/transaction.ixx new file mode 100644 index 0000000..35a2d78 --- /dev/null +++ b/odb/tracer/transaction.ixx @@ -0,0 +1,35 @@ +// file : odb/tracer/transaction.ixx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include <odb/tracer/database.hxx> +#include <odb/tracer/transaction-impl.hxx> + +namespace odb +{ + namespace tracer + { + inline transaction:: + transaction (transaction_impl* impl) + : odb::transaction (impl) + { + } + + inline transaction::database_type& transaction:: + database () + { + return static_cast<database_type&> (odb::transaction::database ()); + } + + inline transaction_impl& transaction:: + implementation () + { + // We can use static_cast here since we have an instance of + // tracer::transaction. + // + return static_cast<transaction_impl&> ( + odb::transaction::implementation ()); + } + } +} |