From 3b457daf6b252ef31ec0611e7375aa4badd8e63d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Mar 2013 13:10:41 +0200 Subject: Add support for copying database models --- odb/semantics/relational/elements.hxx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'odb/semantics/relational/elements.hxx') diff --git a/odb/semantics/relational/elements.hxx b/odb/semantics/relational/elements.hxx index 8dde6bc..2321e1a 100644 --- a/odb/semantics/relational/elements.hxx +++ b/odb/semantics/relational/elements.hxx @@ -196,7 +196,12 @@ namespace semantics // nameable (string const& id): id_ (id), named_ (0) {} - void + virtual nameable& + clone (scope_type&, graph&) const = 0; + + // Virtual because we call it via nameable interface (e.g., in copy). + // + virtual void add_edge_right (names_type& e) { assert (named_ == 0); @@ -206,6 +211,7 @@ namespace semantics using node::add_edge_right; protected: + nameable (nameable const&, graph& g); nameable (xml::parser&, graph& g); void @@ -313,10 +319,13 @@ namespace semantics public: scope (): first_key_ (names_.end ()) {} - void + // Virtual because we call it via scope interface (e.g., in copy). + // + virtual void add_edge_left (names_type&); protected: + scope (scope const&, graph&); scope (xml::parser&, graph&); void @@ -330,6 +339,10 @@ namespace semantics typename names_list::iterator first_key_; }; + template <> + void scope:: + add_edge_left (names_type&); + typedef scope uscope; typedef scope qscope; } -- cgit v1.1