summaryrefslogtreecommitdiff
path: root/odb/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-05 15:50:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-05 15:50:07 +0200
commit5b27e12cc00c3faf4f8171d4f41a0ec5d155db48 (patch)
tree69c46d3fc0380d1681283c87bd90227e6e1138ae /odb/context.hxx
parent07299aa3a0a840845c5d22b74af30aa0ce3ac9f1 (diff)
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.
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx7
1 files changed, 7 insertions, 0 deletions
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_type> ("container-kind");
}
+ static bool
+ container_smart (semantics::type& c)
+ {
+ return c.get<bool> ("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