diff options
Diffstat (limited to 'odb/lazy-ptr.hxx')
-rw-r--r-- | odb/lazy-ptr.hxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/odb/lazy-ptr.hxx b/odb/lazy-ptr.hxx index d54cac0..e340d94 100644 --- a/odb/lazy-ptr.hxx +++ b/odb/lazy-ptr.hxx @@ -72,6 +72,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. + // + T* get_eager () const; + template <class DB, class ID> lazy_ptr (DB&, const ID&); template <class DB, class Y> lazy_ptr (DB&, Y*); @@ -185,6 +190,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. + // + std::auto_ptr<T>& get_eager () const; + template <class DB, class ID> lazy_auto_ptr (DB&, const ID&); template <class DB> lazy_auto_ptr (DB&, T*); template <class DB, class Y> lazy_auto_ptr (DB&, std::auto_ptr<Y>&); @@ -305,6 +315,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. + // + std::unique_ptr<T, D>& get_eager () const; + template <class DB, class ID> lazy_unique_ptr (DB&, const ID&); template <class DB> lazy_unique_ptr (DB&, pointer); template <class DB> lazy_unique_ptr (DB&, pointer, const deleter_type&); @@ -464,6 +479,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. + // + std::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); @@ -593,6 +613,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. + // + std::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 std::shared_ptr<Y>&); template <class DB, class Y> lazy_weak_ptr (DB&, const std::weak_ptr<Y>&); |