示例#1
0
std::string libclang_vim::stringize_cursor_extra_info(CXCursor const& cursor) {
    std::string result;

    if (clang_isCursorDefinition(cursor)) {
        result += "'is_definition':1,";
    }
    if (clang_Cursor_isDynamicCall(cursor)) {
        result += "'is_dynamic_call':1,";
    }
    if (clang_Cursor_isVariadic(cursor)) {
        result += "'is_variadic':1,";
    }
    if (clang_CXXMethod_isVirtual(cursor)) {
        result += "'is_virtual_member_function':1,";
    }
    if (clang_CXXMethod_isPureVirtual(cursor)) {
        result += "'is_pure_virtual_member_function':1,";
    }
    if (clang_CXXMethod_isStatic(cursor)) {
        result += "'is_static_member_function':1,";
    }

    auto const access_specifier = clang_getCXXAccessSpecifier(cursor);
    switch (access_specifier) {
    case CX_CXXPublic:
        result += "'access_specifier':'public',";
        break;
    case CX_CXXPrivate:
        result += "'access_specifier':'private',";
        break;
    case CX_CXXProtected:
        result += "'access_specifier':'protected',";
        break;
    case CX_CXXInvalidAccessSpecifier:
        break;
    }

    return result;
}
示例#2
0
bool Cursor::is_static_method() const
{
	return clang_CXXMethod_isStatic(m_cx_cursor) == 0;
}
示例#3
0
bool cursor::isStatic()
{
    return clang_CXXMethod_isStatic(cur);
}
示例#4
0
bool Cursor::isStaticMethod() const
{
    return clang_CXXMethod_isStatic(cxCursor);
}