void method_wrapper_base::init() { create_signature_string(); // register the underlying type with the following calls: get_return_type(); get_parameter_infos(); }
string method_wrapper_base::get_signature() const { const auto param_list = get_parameter_infos(); string result = std::string(get_name()) + "( "; auto ref_list = get_is_reference(); auto const_list = get_is_const(); for (const auto& param : param_list) { result += param.get_type().get_name() + string(is_const_list[const_list[param.get_index()]]) + string(is_ref_list[ref_list[param.get_index()]]); if (param.get_index() < param_list.size() - 1) result += ", "; } if (param_list.empty()) result += ")"; else result += " )"; return result; }
void method_wrapper_base::create_signature_string() { if (!m_signature.empty()) return; const auto param_list = get_parameter_infos(); m_signature = std::string(get_name()) + "( "; auto ref_list = get_is_reference(); auto const_list = get_is_const(); for (const auto& param : param_list) { m_signature += param.get_type().get_name().to_string() + string(is_const_list[const_list[param.get_index()]]) + string(is_ref_list[ref_list[param.get_index()]]); if (param.get_index() < param_list.size() - 1) m_signature += ", "; } if (param_list.empty()) m_signature += ")"; else m_signature += " )"; m_signature_view = m_signature; }
void constructor_wrapper_base::init() { create_signature_string(); get_instanciated_type(); get_parameter_infos(); }