aboutsummaryrefslogtreecommitdiff
path: root/odb/context.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-19 19:57:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-19 19:57:35 +0200
commit6e35807bd495c0001cba229fd082e45f0421100e (patch)
tree229d40ebc69bcc9ef04147ef95534ddb39771b8d /odb/context.hxx
parentcf469aa28804418338c79a5f9c68608ea2f2807a (diff)
Populate custom type map, make available in context
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/odb/context.hxx b/odb/context.hxx
index 3b283ee..a98167f 100644
--- a/odb/context.hxx
+++ b/odb/context.hxx
@@ -112,6 +112,34 @@ typedef std::vector<class_inheritance_chain> data_member_scope;
// Semantic graph context types.
//
+// Custom C++ type mapping.
+//
+struct custom_cxx_type
+{
+ custom_cxx_type (): type_node (0), as_node (0) {}
+
+ tree type_node;
+ std::string type_name;
+ semantics::type* type;
+ semantics::names* type_hint;
+
+ tree as_node;
+ std::string as_name;
+ semantics::type* as;
+ semantics::names* as_hint;
+
+ // Empty expression means the values are implicitly convertible.
+ //
+ cxx_tokens to;
+ cxx_tokens from;
+
+ location_t loc;
+};
+
+typedef std::vector<custom_cxx_type> custom_cxx_types;
+typedef std::map<semantics::type*, custom_cxx_type*> custom_cxx_type_map;
+
+
// Object or view pointer.
//
struct class_pointer
@@ -1675,6 +1703,8 @@ public:
regex_mapping const& accessor_regex;
regex_mapping const& modifier_regex;
+ custom_cxx_type_map const& custom_type_map;
+
bool embedded_schema;
bool separate_schema;