diff options
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 20 |
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. |