From c67c06030fb1ac622c96211bffc054a85efe0aa8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Mar 2013 13:09:45 +0200 Subject: Add support for maintaining log of database model changes --- odb/semantics/relational/elements.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'odb/semantics/relational/elements.cxx') diff --git a/odb/semantics/relational/elements.cxx b/odb/semantics/relational/elements.cxx index 43c03c0..e14bc00 100644 --- a/odb/semantics/relational/elements.cxx +++ b/odb/semantics/relational/elements.cxx @@ -70,6 +70,24 @@ namespace semantics throw duplicate_name (*this, (*i->second)->nameable (), n); } + template <> + void scope:: + remove_edge_left (names_type& e) + { + typename names_iterator_map::iterator i (iterator_map_.find (&e)); + assert (i != iterator_map_.end ()); + + // If we are removing the first key, then move to the next key (or + // the end which means there are no keys). + // + if (first_key_ == i->second) + first_key_++; + + names_.erase (i->second); + names_map_.erase (e.name ()); + iterator_map_.erase (i); + } + // type info // namespace -- cgit v1.1