From 8e69f40ab32dc8604b68f360ae30fa961ba036ee Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 4 Feb 2015 17:23:54 +0200 Subject: Implement object loading views See section 10.2 in the manual for details. --- odb/instance.hxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'odb/instance.hxx') diff --git a/odb/instance.hxx b/odb/instance.hxx index 461efd1..7047c08 100644 --- a/odb/instance.hxx +++ b/odb/instance.hxx @@ -212,6 +212,23 @@ struct instance x_ = factory_type::create (prototype); } + template + instance (A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6 a6) + { + base_type prototype (a1, a2, a3, a4, a5, a6); + x_ = factory_type::create (prototype); + } + + template + instance (A1 const& a1, A2 const& a2, A3 const& a3, A4 const& a4, + A5 const& a5, A6 const& a6) + { + base_type prototype (a1, a2, a3, a4, a5, a6); + x_ = factory_type::create (prototype); + } + instance (instance const& i) { // This is tricky: use the other instance as a prototype. -- cgit v1.1