예제 #1
0
        public override bool VisitMethodDecl(Method method)
        {
            if (!base.VisitMethodDecl(method) || !method.IsVirtual || method.Ignore)
            {
                return(false);
            }

            var functionType = new FunctionType
            {
                CallingConvention = method.CallingConvention,
                IsDependent       = method.IsDependent,
                ReturnType        = method.ReturnType
            };

            TypePrinter.PushMarshalKind(MarshalKind.VTableReturnValue);
            functionType.Parameters.AddRange(
                method.GatherInternalParams(Context.ParserOptions.IsItaniumLikeAbi, true));

            method.FunctionType = CheckForDelegate(new QualifiedType(functionType),
                                                   method.Namespace, @private: true);
            TypePrinter.PopMarshalKind();

            return(true);
        }