aboutsummaryrefslogtreecommitdiff
path: root/odb/session.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-21 13:00:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-21 13:00:33 +0200
commita28444da4ca6adb016f719e032174ccb54e1692e (patch)
tree75fe8ceae2d20baa3d4b5375a832598efe8b2fce /odb/session.ixx
parent0046a34d5ad5fc1e88b33279605f179646b0ea59 (diff)
Rework const object handling
Now objects are always loaded as non-const and the object cache in session treats all objects as non-const.
Diffstat (limited to 'odb/session.ixx')
-rw-r--r--odb/session.ixx47
1 files changed, 0 insertions, 47 deletions
diff --git a/odb/session.ixx b/odb/session.ixx
index c6708b7..573deb2 100644
--- a/odb/session.ixx
+++ b/odb/session.ixx
@@ -15,51 +15,4 @@ namespace odb
//
p.map_->erase (p.pos_);
}
-
- //
- // object_pointers
- //
- template <typename T>
- inline session::object_pointers<T>::
- object_pointers () : p_ (), cp_ () {}
-
- template <typename T>
- inline void session::object_pointers<T>::
- set (const pointer_type& p)
- {
- p_ = p;
- cp_ = const_pointer_type ();
- }
-
- template <typename T>
- inline void session::object_pointers<T>::
- set (const const_pointer_type& cp)
- {
- p_ = pointer_type ();
- cp_ = cp;
- }
-
- template <typename T>
- inline void session::object_pointers<T>::
- get (pointer_type& p) const
- {
- if (!pointer_traits<pointer_type>::null_ptr (p_))
- p = p_;
- else if (!pointer_traits<const_pointer_type>::null_ptr (cp_))
- throw const_object ();
- else
- p = pointer_type ();
- }
-
- template <typename T>
- inline void session::object_pointers<T>::
- get (const_pointer_type& cp) const
- {
- if (!pointer_traits<pointer_type>::null_ptr (p_))
- cp = const_pointer_type (p_);
- else if (!pointer_traits<const_pointer_type>::null_ptr (cp_))
- cp = cp_;
- else
- cp = const_pointer_type ();
- }
}