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()); }
public virtual bool HasZProcDesc(ZMethodCall procDesc) { foreach (ZLMethodDesc item in ZDescs) { if (ZDescUtil.ZEqualsDesc(item, procDesc)) { return(true); } } return(false); }
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()); }
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[] { }); }
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); }
public bool HasZProcDesc(ZMethodCall procDesc) { return(ZDescUtil.ZEqualsDesc(ZMethodDesc, procDesc));// ZMethodDesc.ZEquals(procDesc); }