예제 #1
0
        internal static new Ref Create(CXCursor handle)
        {
            Ref result;

            switch (handle.Kind)
            {
            case CXCursorKind.CXCursor_CXXBaseSpecifier:
            {
                result = new CXXBaseSpecifier(handle);
                break;
            }

            default:
            {
                Debug.WriteLine($"Unhandled reference kind: {handle.KindSpelling}.");
                result = new Ref(handle, handle.Kind);
                break;
            }
            }

            return(result);
        }
예제 #2
0
파일: Ref.cs 프로젝트: zebmason/ClangSharp
        internal static new Ref Create(CXCursor handle)
        {
            Ref result;

            switch (handle.Kind)
            {
            case CXCursorKind.CXCursor_CXXBaseSpecifier:
            {
                result = new CXXBaseSpecifier(handle);
                break;
            }

            case CXCursorKind.CXCursor_ObjCSuperClassRef:
            case CXCursorKind.CXCursor_ObjCProtocolRef:
            case CXCursorKind.CXCursor_ObjCClassRef:
            case CXCursorKind.CXCursor_TypeRef:
            case CXCursorKind.CXCursor_TemplateRef:
            case CXCursorKind.CXCursor_NamespaceRef:
            case CXCursorKind.CXCursor_MemberRef:
            case CXCursorKind.CXCursor_LabelRef:
            case CXCursorKind.CXCursor_OverloadedDeclRef:
            case CXCursorKind.CXCursor_VariableRef:
            {
                result = new Ref(handle, handle.Kind);
                break;
            }

            default:
            {
                Debug.WriteLine($"Unhandled reference kind: {handle.KindSpelling}.");
                result = new Ref(handle, handle.Kind);
                break;
            }
            }

            return(result);
        }