bool mdb_shell::is_wrap_type(const data::type& type) { // TODO this check could be made more strict, // since we know whats inside wrap<...> (mp->get_evaluation_result) return boost::starts_with(type.name(), wrap_prefix) && boost::ends_with(type.name(), wrap_suffix); }
data::type mdb_shell::trim_wrap_type(const data::type& type) { assert(is_wrap_type(type)); return data::type(boost::trim_copy(type.name().substr( wrap_prefix.size(), type.name().size() - wrap_prefix.size() - wrap_suffix.size()))); }
void json_displayer::show_type(const data::type& type_) { show_object(_writer, {{"type", "type"}, {"name", type_.name()}}); _writer.end_document(); }
void console_displayer::show_type(const data::type& type_) { show_cpp_code(type_.name()); }