From 0748ec6af7ca878d30e7bb20ae2792cd70c88cad Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 10 Aug 2010 17:04:40 +0200 Subject: Add ability to load result into an existing object --- odb/result.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/odb/result.hxx b/odb/result.hxx index 7356395..42939a9 100644 --- a/odb/result.hxx +++ b/odb/result.hxx @@ -72,6 +72,14 @@ namespace odb return *this; } + public: + void + load (T& x) + { + res_->current (x); + } + + public: bool equal (const result_iterator& j) { @@ -116,6 +124,9 @@ namespace odb current (bool release) = 0; virtual void + current (T&) = 0; + + virtual void next () = 0; }; -- cgit v1.1