summaryrefslogtreecommitdiff
path: root/odb/instance.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-04 17:23:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-04 17:23:54 +0200
commit8e69f40ab32dc8604b68f360ae30fa961ba036ee (patch)
tree5448cea6c20f7e6c5cd80ae752b49e1a696bcd6e /odb/instance.hxx
parent36920a538c7b207c0b36b2270108a717479e0ed1 (diff)
Implement object loading views
See section 10.2 in the manual for details.
Diffstat (limited to 'odb/instance.hxx')
-rw-r--r--odb/instance.hxx17
1 files changed, 17 insertions, 0 deletions
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 <typename A1, typename A2, typename A3, typename A4, typename A5,
+ typename A6>
+ 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 <typename A1, typename A2, typename A3, typename A4, typename A5,
+ typename A6>
+ 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.