示例#1
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
                return "Std.Vector";

            return string.Format("Std.Vector<{0}>", ctx.GetTemplateParameterList());
        }
示例#2
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
                return Type.IsAddress() ? "QList.Internal*" : "QList.Internal";

            return string.Format("System.Collections.Generic.{0}<{1}>",
                ctx.MarshalKind == CSharpMarshalKind.DefaultExpression ? "List" : "IList",
                ctx.GetTemplateParameterList());
        }
示例#3
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
            {
                return(Type.IsAddress() ? "QList.Internal*" : "QList.Internal");
            }

            return(string.Format("System.Collections.Generic.{0}<{1}>",
                                 ctx.CSharpKind == CSharpTypePrinterContextKind.DefaultExpression ? "List" : "IList",
                                 ctx.GetTemplateParameterList()));
        }
示例#4
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
            {
                return(string.Format("QList.{0}{1}", Helpers.InternalStruct,
                                     Type.IsAddress() ? "*" : string.Empty));
            }

            return(string.Format("System.Collections.Generic.{0}<{1}>",
                                 ctx.MarshalKind == CSharpMarshalKind.DefaultExpression ? "List" : "IList",
                                 ctx.GetTemplateParameterList()));
        }
示例#5
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
            {
                // pointless, put just so that the generated code compiles
                return("global::System.IntPtr");
            }

            return(string.Format("System.Collections.Generic.{0}<{1}>",
                                 ctx.CSharpKind == CSharpTypePrinterContextKind.DefaultExpression ? "List" : "IList",
                                 ctx.GetTemplateParameterList()));
        }
示例#6
0
文件: QList.cs 项目: joonhwan/QtSharp
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
            {
                if (Type.IsAddress())
                {
                    return("QList.Internal*");
                }
                return("QList.Internal");
            }

            TemplateSpecializationType templateSpecialization = (TemplateSpecializationType)ctx.Type.Desugar();
            TemplateArgument           templateArgument       = templateSpecialization.Arguments[0];

            if (templateArgument.Type.Type.IsPointerToPrimitiveType())
            {
                return("System.Collections.Generic.IList<global::System.IntPtr>");
            }
            return(string.Format("System.Collections.Generic.IList<{0}>", ctx.GetTemplateParameterList()));
        }
示例#7
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
                return "Std.Vector";

            return string.Format("Std.Vector<{0}>", ctx.GetTemplateParameterList());
        }
示例#8
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
            {
                if (Type.IsAddress())
                {
                    return "QList.Internal*";
                }
                return "QList.Internal";
            }

            TemplateSpecializationType templateSpecialization = (TemplateSpecializationType) ctx.Type.Desugar();
            TemplateArgument templateArgument = templateSpecialization.Arguments[0];
            if (templateArgument.Type.Type.IsPointerToPrimitiveType())
            {
                return "System.Collections.Generic.IList<global::System.IntPtr>";
            }
            return string.Format("System.Collections.Generic.IList<{0}>", ctx.GetTemplateParameterList());
        }
示例#9
0
        public override string CSharpSignature(CSharpTypePrinterContext ctx)
        {
            if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
                // pointless, put just so that the generated code compiles
                return "global::System.IntPtr";

            return string.Format("System.Collections.Generic.{0}<{1}>",
                ctx.CSharpKind == CSharpTypePrinterContextKind.DefaultExpression ? "List" : "IList",
                ctx.GetTemplateParameterList());
        }