From 6e35807bd495c0001cba229fd082e45f0421100e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 Jun 2015 19:57:35 +0200 Subject: Populate custom type map, make available in context --- odb/context.hxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'odb/context.hxx') 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 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_types; +typedef std::map 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; -- cgit v1.1