aboutsummaryrefslogtreecommitdiff
path: root/odb/lazy-ptr.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-04-18 11:15:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-04-18 11:15:37 +0200
commitb2b8dba6c149407d6657398a874c75629871d21a (patch)
tree587f30ada0847768fef5835589b9568f01285638 /odb/lazy-ptr.hxx
parentabd2a4b899f16e2565c7db534ec558fec27173ff (diff)
Fix loaded() function in lazy_ptr to conform to documentation
Diffstat (limited to 'odb/lazy-ptr.hxx')
-rw-r--r--odb/lazy-ptr.hxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/odb/lazy-ptr.hxx b/odb/lazy-ptr.hxx
index 9eb8af8..b181639 100644
--- a/odb/lazy-ptr.hxx
+++ b/odb/lazy-ptr.hxx
@@ -53,7 +53,15 @@ namespace odb
public:
typedef odb::database database_type;
+ // NULL loaded()
+ //
+ // true true NULL pointer to transient object
+ // false true valid pointer to persistent object
+ // true false unloaded pointer to persistent object
+ // false false valid pointer to transient object
+ //
bool loaded () const;
+
T* load () const;
// Unload the pointer. For transient objects this function is
@@ -154,7 +162,15 @@ namespace odb
public:
typedef odb::database database_type;
+ // NULL loaded()
+ //
+ // true true NULL pointer to transient object
+ // false true valid pointer to persistent object
+ // true false unloaded pointer to persistent object
+ // false false valid pointer to transient object
+ //
bool loaded () const;
+
std::auto_ptr<T>& load () const;
// Unload the pointer. For transient objects this function is