summaryrefslogtreecommitdiff
path: root/odb/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-24 20:20:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-24 20:20:50 +0200
commit425fb7fdbe9cdb48ad84dda45c53d92dc23c3ad4 (patch)
treeb1cf711fea2d891efdfe2b29f9bf908d9f629572 /odb/context.hxx
parentdfc260adf46e79b039685d554797b403d76c6bfd (diff)
Cleanup of member access
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/odb/context.hxx b/odb/context.hxx
index e74aeb1..6646e93 100644
--- a/odb/context.hxx
+++ b/odb/context.hxx
@@ -324,8 +324,8 @@ struct member_access
//
std::string
translate (std::string const& obj,
- std::string const& val = std::string (),
- std::string const& db = std::string ()) const;
+ std::string const& val = std::string (),
+ std::string const& db = std::string ()) const;
location loc;
const char* kind; // accessor/modifier; used for diagnostics.
@@ -688,6 +688,22 @@ public:
bool make_const,
string const& var = "");
+ // Member access helpers. Database can be empty. If type is not empty,
+ // then it should be the non-cvr type of the member (e.g., id_type).
+ //
+ void
+ set_member (semantics::data_member& m,
+ const std::string& obj,
+ const std::string& val,
+ const std::string& db,
+ const std::string& type = "");
+
+ void
+ inc_member (semantics::data_member& m,
+ const std::string& sobj, // Set expression object.
+ const std::string& gobj, // Get expression object.
+ const std::string& type = "");
+
public:
// Resolve data member name in the form "a.b.c" to the data member path,
// issuing diagnostics and throwing operation_filed in case of an error.