Beispiel #1
0
        public ZLMethodInfo[] SearchDeclaredZMethod(ZMethodCall zcall)
        {
            List <ZLMethodInfo> methods = new List <ZLMethodInfo>();

            foreach (var item in this.ZMethods)
            {
                if (item.HasZProcDesc(zcall))
                {
                    methods.Add(item);
                }
            }
            if (methods.Count > 1)
            {
                ZLMethodInfo tempMethod = methods[0];
                for (int i = 1; i < methods.Count; i++)
                {
                    var itemMethod = methods[i];
                    ZTypeCompareEnum compareEnum = ParamCompare(tempMethod, itemMethod);
                    if (compareEnum == ZTypeCompareEnum.SuperOf)
                    {
                        tempMethod = itemMethod;
                    }
                }
                methods.Clear();
                methods.Add(tempMethod);
            }
            return(methods.ToArray());
        }
Beispiel #2
0
 public virtual bool HasZProcDesc(ZMethodCall procDesc)
 {
     foreach (ZLMethodDesc item in ZDescs)
     {
         if (ZDescUtil.ZEqualsDesc(item, procDesc))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #3
0
        public ZCMethodInfo[] SearchDeclaredZMethod(ZMethodCall zdesc)
        {
            List <ZCMethodInfo> methods = new List <ZCMethodInfo>();
            var ZMethods = this._ZCompilingMethods;

            foreach (ZCMethodInfo item in ZMethods)
            {
                if (item.HasZProcDesc(zdesc))
                {
                    methods.Add(item);
                }
            }
            return(methods.ToArray());
        }
Beispiel #4
0
        public ZLMethodInfo[] SearchZMethod(ZMethodCall zcall)
        {
            ZLClassInfo temp = this;

            while (temp != null)
            {
                ZLMethodInfo[] zmethods = temp.SearchDeclaredZMethod(zcall);
                if (zmethods.Length > 0)
                {
                    return(zmethods);
                }
                else
                {
                    temp = temp.BaseZClass;
                }
            }
            return(new ZLMethodInfo[] { });
        }
Beispiel #5
0
        public ZMethodCall CreateTail( )
        {
            ZMethodCall tailDesc = new ZMethodCall();
            var         parts    = this.GetParts();

            for (int i = 1; i < this.GetPartCount(); i++)
            {
                object item = this.GetPart(i);
                if (item is string)
                {
                    tailDesc.Add(item as string);
                }
                else if (item is ZBracketCall)
                {
                    tailDesc.Add(item as ZBracketCall);
                }
                else
                {
                    throw new ZLibRTException();
                }
            }
            return(tailDesc);
        }
Beispiel #6
0
 public bool HasZProcDesc(ZMethodCall procDesc)
 {
     return(ZDescUtil.ZEqualsDesc(ZMethodDesc, procDesc));// ZMethodDesc.ZEquals(procDesc);
 }