From 9608495c8c9a4ee3900cf98830dc7b497c1edd10 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/qt/smart-ptr/lazy-ptr.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'odb/qt/smart-ptr/lazy-ptr.hxx') diff --git a/odb/qt/smart-ptr/lazy-ptr.hxx b/odb/qt/smart-ptr/lazy-ptr.hxx index 71c606c..d7a077d 100644 --- a/odb/qt/smart-ptr/lazy-ptr.hxx +++ b/odb/qt/smart-ptr/lazy-ptr.hxx @@ -153,6 +153,12 @@ public: // 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. + // + QSharedPointer + getEager () const; + template QLazySharedPointer (DB&, const ID&); @@ -328,6 +334,12 @@ public: 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. + // + QWeakPointer + getEager () const; + template QLazyWeakPointer (DB&, const ID&); -- cgit v1.1