コード例 #1
0
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;
}
コード例 #2
0
string method_container_base::get_signature() const
{
    auto params = get_parameter_types();
    string result = _name + "( ";
    std::size_t index = 0;
    auto ref_list = get_is_reference();
    auto const_list = get_is_const();
    for (const auto& type : params)
    {
        result += type.get_name() + string(is_const_list[const_list[index]]) + string(is_ref_list[ref_list[index]]);
        if (index < params.size() - 1)
            result += ", ";

        ++index;
    }
    if (params.empty())
        result += ")";
    else
        result += " )";

    return result;
}
コード例 #3
0
ファイル: method_wrapper_base.cpp プロジェクト: sbalogh/rttr
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;
}