From 45571dd57a8f44b982956643944d317ef71c8902 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 May 2013 19:22:51 -0400 Subject: Add ability to get underlying eager pointer in weak pointers --- odb/boost/smart-ptr/lazy-ptr.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'odb/boost/smart-ptr/lazy-ptr.hxx') 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 get_eager () const; + template lazy_shared_ptr (DB&, const ID&); template lazy_shared_ptr (DB&, Y*); template 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 get_eager () const; + template lazy_weak_ptr (DB&, const ID&); template lazy_weak_ptr (DB&, const ::boost::shared_ptr&); template lazy_weak_ptr (DB&, const ::boost::weak_ptr&); -- cgit v1.1