diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-24 20:20:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-06-24 20:20:50 +0200 |
commit | 425fb7fdbe9cdb48ad84dda45c53d92dc23c3ad4 (patch) | |
tree | b1cf711fea2d891efdfe2b29f9bf908d9f629572 /odb/header.cxx | |
parent | dfc260adf46e79b039685d554797b403d76c6bfd (diff) |
Cleanup of member access
Diffstat (limited to 'odb/header.cxx')
-rw-r--r-- | odb/header.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/odb/header.cxx b/odb/header.cxx index f889ce9..0a01311 100644 --- a/odb/header.cxx +++ b/odb/header.cxx @@ -64,7 +64,7 @@ traverse_object (type& c) bool auto_id (id && auto_ (*id)); bool base_id (id && &id->scope () != &c); // Comes from base. - data_member* optimistic (context::optimistic (c)); + data_member* opt (context::optimistic (c)); type* poly_root (polymorphic (c)); bool poly (poly_root != 0); @@ -163,7 +163,7 @@ traverse_object (type& c) os << "typedef object_traits< " << type << " >::id_type id_type;"; - if (optimistic != 0) + if (opt != 0) os << "typedef object_traits< " << type << " >::version_type " << "version_type;"; @@ -183,10 +183,10 @@ traverse_object (type& c) os << "typedef " << t.fq_name (hint) << " id_type;"; } - if (optimistic != 0) + if (opt != 0) { semantics::names* hint; - semantics::type& t (utype (*optimistic, hint)); + semantics::type& t (utype (*opt, hint)); os << "typedef " << t.fq_name (hint) << " version_type;"; } @@ -211,7 +211,7 @@ traverse_object (type& c) os << "static const bool abstract = " << abst << ";" << endl; - // id () + // id() // if (id != 0 || !reuse_abst) { @@ -225,6 +225,15 @@ traverse_object (type& c) << endl; } + // version() + // + if (opt != 0) + { + os << "static version_type" << endl + << "version (const object_type&);" + << endl; + } + // Query. // if (options.generate_query ()) |