diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-24 14:50:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-05-24 14:50:57 +0200 |
commit | 1e185d1bbc3499c1154c246b2a21124c8df51b20 (patch) | |
tree | 739b7aad0b64843bfb78bc50a30b4e1d10a0ce10 | |
parent | 2913d287ff843c256f304a067d439934e3767974 (diff) |
See through object pointers, wrappers when looking for type options
-rw-r--r-- | odb/context.cxx | 24 |
1 files 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<strings> ("options")); + strings const& o (t->get<strings> ("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<strings> ("options")); + strings const& o (t->get<strings> ("options")); for (strings::const_iterator i (o.begin ()); i != o.end (); ++i) { |