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 | fb2519f6f9d79c7626a0281ad24925b4976cd81d (patch) | |
tree | 0363e3f37d2466b9411485e44638c76141deeacf /odb/lazy-ptr.ixx | |
parent | 6c666b0dfa38cf1f6407817261a829645e86d855 (diff) |
Add ability to get underlying eager pointer in weak pointers
Diffstat (limited to 'odb/lazy-ptr.ixx')
-rw-r--r-- | odb/lazy-ptr.ixx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/odb/lazy-ptr.ixx b/odb/lazy-ptr.ixx index 724142a..da02528 100644 --- a/odb/lazy-ptr.ixx +++ b/odb/lazy-ptr.ixx @@ -137,6 +137,13 @@ namespace odb } template <class T> + inline T* lazy_ptr<T>:: + get_eager () const + { + return p_; + } + + template <class T> template <class DB, class ID> inline lazy_ptr<T>:: lazy_ptr (DB& db, const ID& id): p_ (0), i_ (db, id) {} @@ -396,6 +403,13 @@ namespace odb } template <class T> + inline std::auto_ptr<T>& lazy_auto_ptr<T>:: + get_eager () const + { + return p_; + } + + template <class T> template <class DB, class ID> inline lazy_auto_ptr<T>:: lazy_auto_ptr (DB& db, const ID& id): i_ (db, id) {} @@ -667,6 +681,13 @@ namespace odb } template <class T, class D> + inline std::unique_ptr<T, D>& lazy_unique_ptr<T, D>:: + get_eager () const + { + return p_; + } + + template <class T, class D> template <class DB, class ID> inline lazy_unique_ptr<T, D>:: lazy_unique_ptr (DB& db, const ID& id): i_ (db, id) {} @@ -1150,6 +1171,13 @@ namespace odb } template <class T> + inline std::shared_ptr<T> lazy_shared_ptr<T>:: + get_eager () const + { + return p_; + } + + template <class T> template <class DB, class ID> inline lazy_shared_ptr<T>:: lazy_shared_ptr (DB& db, const ID& id): i_ (db, id) {} @@ -1536,6 +1564,13 @@ namespace odb } template <class T> + inline std::weak_ptr<T> lazy_weak_ptr<T>:: + get_eager () const + { + return p_; + } + + template <class T> template <class DB, class ID> inline lazy_weak_ptr<T>:: lazy_weak_ptr (DB& db, const ID& id): i_ (db, id) {} |