From ba529a8179f27d3ccbc584925fde6cd270f790ce Mon Sep 17 00:00:00 2001 From: Constantin Michael Date: Wed, 29 Jun 2011 08:31:19 +0200 Subject: Add hooks for generating extra code in container traits --- odb/relational/header.hxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'odb/relational/header.hxx') diff --git a/odb/relational/header.hxx b/odb/relational/header.hxx index 62c2e92..11ecfdf 100644 --- a/odb/relational/header.hxx +++ b/odb/relational/header.hxx @@ -202,6 +202,16 @@ namespace relational } virtual void + container_public_extra_pre (semantics::data_member&) + { + } + + virtual void + container_public_extra_post (semantics::data_member&) + { + } + + virtual void container (semantics::data_member& m) { using semantics::type; @@ -343,6 +353,8 @@ namespace relational os << "{"; + container_public_extra_pre (m); + if (!abst) { // column_count @@ -363,7 +375,9 @@ namespace relational if (base) { + container_public_extra_post (m); os << "};"; + return; } @@ -693,10 +707,12 @@ namespace relational << "erase (const " << db << "::binding& id, statements_type&);" << endl; + container_public_extra_post (m); + os << "};"; } - private: + protected: semantics::class_& c_; }; -- cgit v1.1