aboutsummaryrefslogtreecommitdiff
path: root/odb/details/shared-ptr/base.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-08-14 09:37:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-11-25 06:39:57 +0200
commit8d4d2568f356cb9beb1553bf58ad69c1c800b996 (patch)
treed6466f2dec931669405b38a6cf47e8bb0998a4fd /odb/details/shared-ptr/base.cxx
parent46f28dcdf5a72ed430486b562213ad147b65526a (diff)
Implement bulk database operation support for Oracle and SQL Server
Diffstat (limited to 'odb/details/shared-ptr/base.cxx')
-rw-r--r--odb/details/shared-ptr/base.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/odb/details/shared-ptr/base.cxx b/odb/details/shared-ptr/base.cxx
index 590d844..0214c54 100644
--- a/odb/details/shared-ptr/base.cxx
+++ b/odb/details/shared-ptr/base.cxx
@@ -3,6 +3,7 @@
// license : GNU GPL v2; see accompanying LICENSE file
#include <odb/details/shared-ptr/base.hxx>
+#include <odb/details/shared-ptr/exception.hxx>
using std::size_t;
@@ -19,6 +20,12 @@ namespace odb
return "object is not shared";
}
+ not_shared* not_shared::
+ clone () const
+ {
+ return new not_shared (*this);
+ }
+
bool shared_base::
_dec_ref_callback ()
{
@@ -29,6 +36,20 @@ namespace odb
return r;
}
+
+ namespace bits
+ {
+ size_t* locator_common::
+ counter (void* x)
+ {
+ size_t* p (static_cast<size_t*> (x));
+
+ if (*(--p) != 0xDEADBEEF)
+ throw not_shared ();
+
+ return --p;
+ }
+ }
}
}