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/relational/header.cxx | |
parent | dfc260adf46e79b039685d554797b403d76c6bfd (diff) |
Cleanup of member access
Diffstat (limited to 'odb/relational/header.cxx')
-rw-r--r-- | odb/relational/header.cxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/odb/relational/header.cxx b/odb/relational/header.cxx index 4d68119..4b8b193 100644 --- a/odb/relational/header.cxx +++ b/odb/relational/header.cxx @@ -16,7 +16,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); @@ -100,8 +100,8 @@ traverse_object (type& c) discriminator_image_member_->traverse (*discriminator); - if (optimistic != 0) - version_image_member_->traverse (*optimistic); + if (opt != 0) + version_image_member_->traverse (*opt); os << "std::size_t version;" << "};"; @@ -134,8 +134,8 @@ traverse_object (type& c) id_image_member_->traverse (*id); - if (optimistic != 0) - version_image_member_->traverse (*optimistic); + if (opt != 0) + version_image_member_->traverse (*opt); os << "std::size_t version;" << "};"; @@ -206,6 +206,10 @@ traverse_object (type& c) os << "using object_traits<object_type>::id;" << endl; + if (opt != 0) + os << "using object_traits<object_type>::version;" + << endl; + if (!poly_derived && id != 0) { if (auto_id) @@ -218,7 +222,7 @@ traverse_object (type& c) << "id (const image_type&);" << endl; - if (optimistic != 0) + if (opt != 0) os << "static version_type" << endl << "version (const image_type&);" << endl; @@ -287,7 +291,7 @@ traverse_object (type& c) { os << "static void" << endl << "bind (" << bind_vector << ", id_image_type&" << - (optimistic != 0 ? ", bool bind_version = true" : "") << ");" + (opt != 0 ? ", bool bind_version = true" : "") << ");" << endl; } @@ -329,7 +333,7 @@ traverse_object (type& c) { os << "static void" << endl << "init (id_image_type&, const id_type&" << - (optimistic != 0 ? ", const version_type* = 0" : "") << ");" + (opt != 0 ? ", const version_type* = 0" : "") << ");" << endl; } @@ -465,7 +469,7 @@ traverse_object (type& c) os << "static const char erase_statement[];"; - if (optimistic != 0 && !poly_derived) + if (opt != 0 && !poly_derived) os << "static const char optimistic_erase_statement[];"; } @@ -710,7 +714,7 @@ traverse_object (type& c) << "const id_type&," << endl << "discriminator_type*"; - if (optimistic != 0) + if (opt != 0) os << "," << endl << "version_type* = 0"; |