From 5b27e12cc00c3faf4f8171d4f41a0ec5d155db48 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Feb 2013 15:50:07 +0200 Subject: Add support for change-tracking containers ODB now supports "smart" ordered containers. Such containers get extra functions for updating and deleting individual elements. Based on this functionality implement two change-tracking containers: odb::vector (equivalent to std::vector) and QOdbList (equivalent to QList). New tests: common/container/change-tracking and qt/common/container/change- tracking. --- odb/context.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'odb/context.hxx') diff --git a/odb/context.hxx b/odb/context.hxx index aa604e4..db8d217 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -866,6 +866,12 @@ public: return c.get ("container-kind"); } + static bool + container_smart (semantics::type& c) + { + return c.get ("container-smart"); + } + static semantics::type& container_idt (semantics::data_member& m) { @@ -913,6 +919,7 @@ public: static unsigned short const test_straight_container = 0x10; static unsigned short const test_inverse_container = 0x20; static unsigned short const test_readonly_container = 0x40; + static unsigned short const test_smart_container = 0x80; // By default the test goes into bases for non-polymorphic // hierarchies and doesn't go for polymorphic. The following -- cgit v1.1