From 1e185d1bbc3499c1154c246b2a21124c8df51b20 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 May 2018 14:50:57 +0200 Subject: See through object pointers, wrappers when looking for type options --- odb/context.cxx | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/odb/context.cxx b/odb/context.cxx index e959e08..866c77f 100644 --- a/odb/context.cxx +++ b/odb/context.cxx @@ -2289,13 +2289,19 @@ column_options (semantics::data_member& m) { // Accumulate options from both type and member. // - semantics::type& t (utype (m)); + semantics::type* t (&utype (m)); + + if (semantics::class_* p = object_pointer (*t)) + t = &utype (*id_member (*p)); + + if (semantics::type* w = wrapper (*t)) + t = w; string r; - if (t.count ("options")) + if (t->count ("options")) { - strings const& o (t.get ("options")); + strings const& o (t->get ("options")); for (strings::const_iterator i (o.begin ()); i != o.end (); ++i) { @@ -2343,13 +2349,19 @@ column_options (semantics::data_member& m, string const& kp) // Accumulate options from type, container, and member. // semantics::type& c (utype (m)); - semantics::type& t (utype (m, kp)); + semantics::type* t (&utype (m, kp)); + + if (semantics::class_* p = object_pointer (*t)) + t = &utype (*id_member (*p)); + + if (semantics::type* w = wrapper (*t)) + t = w; string r; - if (t.count ("options")) + if (t->count ("options")) { - strings const& o (t.get ("options")); + strings const& o (t->get ("options")); for (strings::const_iterator i (o.begin ()); i != o.end (); ++i) { -- cgit v1.1