diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-05-21 19:22:51 -0400 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-05-21 19:22:51 -0400 |
commit | 45571dd57a8f44b982956643944d317ef71c8902 (patch) | |
tree | 45aeb6c684df95c8a1dbb1f95ab1be1e06a18a3b /odb/boost/smart-ptr/lazy-ptr.hxx | |
parent | 1b2c7678a0978da1037e65a8e982f9d303e3a541 (diff) |
Add ability to get underlying eager pointer in weak pointers
Diffstat (limited to 'odb/boost/smart-ptr/lazy-ptr.hxx')
-rw-r--r-- | odb/boost/smart-ptr/lazy-ptr.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/odb/boost/smart-ptr/lazy-ptr.hxx b/odb/boost/smart-ptr/lazy-ptr.hxx index 28dce8a..8f523ac 100644 --- a/odb/boost/smart-ptr/lazy-ptr.hxx +++ b/odb/boost/smart-ptr/lazy-ptr.hxx @@ -98,6 +98,11 @@ namespace odb // void unload () const; + // Get the underlying eager pointer. If this is an unloaded pointer + // to a persistent object, then the returned pointer will be NULL. + // + ::boost::shared_ptr<T> get_eager () const; + template <class DB, class ID> lazy_shared_ptr (DB&, const ID&); template <class DB, class Y> lazy_shared_ptr (DB&, Y*); template <class DB, class Y, class D> lazy_shared_ptr (DB&, Y*, D); @@ -209,6 +214,11 @@ namespace odb // void unload () const; + // Get the underlying eager pointer. If this is an unloaded pointer + // to a persistent object, then the returned pointer will be NULL. + // + ::boost::weak_ptr<T> get_eager () const; + template <class DB, class ID> lazy_weak_ptr (DB&, const ID&); template <class DB, class Y> lazy_weak_ptr (DB&, const ::boost::shared_ptr<Y>&); template <class DB, class Y> lazy_weak_ptr (DB&, const ::boost::weak_ptr<Y>&); |