INNER CODE UNIT · C#

IsUsableMethod

axmolengine/axmol · tools/bindings-generator/src/BindingGenerator.cs:1004

    private static bool IsUsableMethod(CXCursor cursor) =>
        !IsDeprecated(cursor) &&
        cursor.CXXAccessSpecifier == CX_CXXAccessSpecifier.CX_CXXPublic &&
        clang.CXXMethod_isDeleted(cursor) == 0 &&
        clang.Cursor_isVariadic(cursor) == 0 &&
        !Regex.IsMatch(GetCursorText(cursor), @"^\s*\[\[\s*internal\s*\]\]", RegexOptions.CultureInvariant);

    private static bool IsUsableField(CXCursor cursor, CursorTree tree)
    {
        if (IsDeprecated(cursor) ||
            cursor.CXXAccessSpecifier != CX_CXXAccessSpecifier.CX_CXXPublic ||
            cursor.IsAnonymous || string.IsNullOrWhiteSpace(cursor.Spelling.CString))
            return false;

        var type = ResolveType(cursor.Type.Spelling.CString,
                               GetQualifiedName(clang.getCursorSemanticParent(cursor)), tree).Trim();
        // Callback members deliberately use pointer parameters for engine objects
        // (for example std::function<void(PointerEvent*)>).  They are safe to

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…