Exemplo n.º 1
0
    protected Signature(SignatureType type, Parser.SignatureNode sd, ApiTypeBuilder api)
    {
        Type = type;
        var args  = new List <Parameter>();
        var index = 0;

        foreach (var arg in sd.Parameters)
        {
            args.Add(new Parameter(arg, api, index));
            index += 1;
        }

        this.Parameters = args.ToArray();

        this.ReturnType         = api.GetApiType(sd.ReturnType, false);
        this.ReturnValueIsConst = sd.ReturnValueIsConst;
    }
Exemplo n.º 2
0
    public CefCallbackFunction(CefStructType parent, StructCategory category, string name, CefConfigNode cefConfig, Parser.SignatureNode sd, ApiTypeBuilder api, CommentNode comments)
    {
        Name          = name;
        this.Parent   = parent;
        this.Comments = comments;
        if (cefConfig == null)
        {
            CefConfig = new CefConfigNode();
        }
        else
        {
            CefConfig = cefConfig;
        }

        if (category == StructCategory.Client)
        {
            m_callMode     = CfxCallMode.Callback;
            this.Signature = Signature.Create(SignatureType.ClientCallback, CefName, CefConfig, CallMode, sd, api);
        }
        else
        {
            m_callMode     = CfxCallMode.FunctionCall;
            this.Signature = Signature.Create(SignatureType.LibraryCall, CefName, CefConfig, CallMode, sd, api);
        }
    }
Exemplo n.º 3
0
    public static Signature Create(SignatureType type, string cefName, CefConfigNode cefConfig, CfxCallMode callMode, Parser.SignatureNode sd, ApiTypeBuilder api)
    {
        var s  = new Signature(type, sd, api);
        var cs = CustomSignatures.ForFunction(s, cefName, cefConfig);

        if (cs == null)
        {
            s.DebugPrintUnhandledArrayParameters(cefName, cefConfig, callMode);
            AllSignatures.Add(s);
            return(s);
        }
        else
        {
            cs.DebugPrintUnhandledArrayParameters(cefName, cefConfig, callMode);
            AllSignatures.Add(cs);
            return(cs);
        }
    }