From 587db8c7ca28d5cd1722307073aa31aed5b89d0a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 22 Apr 2011 14:07:32 +0200 Subject: Initial support for non-polymorphic inheritance Every class gets a separate table. New test: common/inheritance. --- odb/context.hxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'odb/context.hxx') diff --git a/odb/context.hxx b/odb/context.hxx index f08878d..a09d040 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -102,6 +102,12 @@ public: return t.get ("element-type", 0); } + static bool + abstract (semantics::class_& c) + { + return c.count ("abstract"); + } + // Database names and types. // public: @@ -112,7 +118,7 @@ public: // struct table_prefix { - table_prefix () {} + table_prefix (): level (0) {} table_prefix (string const& p, size_t l): prefix (p), level (l) {} string prefix; @@ -174,7 +180,12 @@ public: out_column_count (semantics::class_&); static semantics::data_member& - id_member (semantics::class_&); + id_member (semantics::class_& c) + { + // Set by the validator. + // + return *c.get ("id-member"); + } // Object pointer information. // -- cgit v1.1