diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-18 13:10:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-10 18:46:43 +0200 |
commit | 3b457daf6b252ef31ec0611e7375aa4badd8e63d (patch) | |
tree | 8874473de1c2cf6c1fd5a63a93c609d6f3fd0127 /odb/semantics/relational/elements.hxx | |
parent | 1112388f458cbbac8a73ca840f7f62f6f517e9fa (diff) |
Add support for copying database models
Diffstat (limited to 'odb/semantics/relational/elements.hxx')
-rw-r--r-- | odb/semantics/relational/elements.hxx | 17 |
1 files changed, 15 insertions, 2 deletions
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<uname>:: + add_edge_left (names_type&); + typedef scope<uname> uscope; typedef scope<qname> qscope; } |