public CefStructPtrPtrType(CefStructPtrType structPtr, string Indirection)
     : base(AddIndirection(structPtr.Name, Indirection))
 {
     this.StructPtr   = structPtr;
     this.Struct      = structPtr.Struct;
     this.Indirection = Indirection;
 }
Beispiel #2
0
    private ApiType FindApiType(Parser.TypeData td)
    {
        ApiType t = null;

        if (td.Indirection == null)
        {
            if (!apiTypes.TryGetValue(td.Name, out t))
            {
                System.Diagnostics.Debugger.Break();
            }
            return(t);
        }

        if (apiTypes.TryGetValue(td.Name + td.Indirection, out t))
        {
            return(t);
        }

        if (!apiTypes.TryGetValue(td.Name, out t))
        {
            System.Diagnostics.Debugger.Break();
        }

        if (t.IsCefEnumType)
        {
            if (td.Indirection == "*")
            {
                t = new CefEnumPtrType(t.AsCefEnumType);
            }
            else
            {
                System.Diagnostics.Debugger.Break();
            }
        }
        else if (t.IsCefStructType)
        {
            if (td.Indirection.Count((char c) => c.Equals('*')) == 1)
            {
                t = new CefStructPtrType(t.AsCefStructType, td.Indirection);
            }
            else if (td.Indirection == "**")
            {
                var t0 = new CefStructPtrType(t.AsCefStructType, "*");
                t = new CefStructOutType(t0, td.Indirection);
                //t = New CefStructRefType(t0, td.Indirection)
                //Debug.Print("StructRef " & t.ToString())
            }
            else if (td.Indirection.Count((char c) => c.Equals('*')) == 2)
            {
                var t0 = new CefStructPtrType(t.AsCefStructType, "*");
                t = new CefStructPtrPtrType(t0, td.Indirection);
            }
            else
            {
                System.Diagnostics.Debugger.Break();
            }
        }
        else if (t.IsBlittableType)
        {
            t = new BlittablePtrType(t.AsBlittableType, td.Indirection);
        }
        else
        {
            System.Diagnostics.Debugger.Break();
        }

        AddType(t);

        return(t);
    }
 public CefStructOutType(CefStructPtrType structPtr, string Indirection)
     : base(structPtr, Indirection)
 {
 }