INNER CODE UNIT · C#

HasBindableDestructor

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

    private static bool HasBindableDestructor(CXCursor record, CursorTree tree) =>
        GetChildren(tree, record)
            .Where(x => x.Kind == CXCursorKind.CXCursor_Destructor)
            .All(x => x.CXXAccessSpecifier == CX_CXXAccessSpecifier.CX_CXXPublic);

    private static IReadOnlyList<CXCursor> GetParameters(CXCursor cursor, CursorTree tree) =>
        GetChildren(tree, cursor)
            .Where(x => x.Kind == CXCursorKind.CXCursor_ParmDecl)
            .OrderBy(GetSourceOffset)
            .ToArray();

    private static string ResolveType(string type, string contextType, CursorTree tree)
    {
        if (string.IsNullOrWhiteSpace(type) || tree.TypeNames.Count == 0)
            return type;

        var contextParts = contextType.Split("::", StringSplitOptions.RemoveEmptyEntries).ToList();
        var matches = Regex.Matches(type, @"[A-Za-z_]\w*");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…