public ParsedFunctionSignature(Function f, ITypePrinter2 typePrinter) { TypePrinter = typePrinter; if (f.IsOperator || f.IsThisCall) { throw new ArgumentException("Unsupported function type", nameof(f)); } Signature = f.FunctionType.Type as FunctionType; Comments = new ParsedComment(f); Name = f.Name; Attributes = f.Attributes; Introducer = "public static extern "; }
public ParsedFunctionSignature(TypedefNameDecl td, ITypePrinter2 typePrinter) { TypePrinter = typePrinter; if (td.TryGetFunctionSignature(out FunctionType signature)) { if (signature.CallingConvention != CppSharp.AST.CallingConvention.C) { throw new NotSupportedException("Only delegates with the 'C' Calling convention are supported"); } Signature = signature; Comments = new ParsedComment(td); Name = td.Name; Attributes = new[] { UnmanagedFunctionPointerAttrib }; Introducer = "public delegate "; } else { throw new ArgumentException("pointer to function type required"); } }
public LibLlvmTemplateFactory(IGeneratorConfig config, ITypePrinter2 typePrinter) { HandleToTemplateMap = config.BuildTemplateMap( ); TypePrinter = typePrinter; }
public ExternalDocXmlTemplate(TranslationUnit tu, ITypePrinter2 typePrinter) { Unit = tu; TypePrinter = typePrinter; }
public PerHeaderInteropTemplate(TranslationUnit tu, ITypePrinter2 typePrinter) { Unit = tu; TypePrinter = typePrinter; }