public GamaFunctionRef FindFunction(GamaParamList parms, bool skipHidden = false) { foreach (var cb in Callbacks) { if (cb.Parameters.Count != parms.Count) { continue; } bool found = true; for (int i = 0; i < parms.Count; i++) { if (cb.Parameters[i].Type != parms[i].Type) { found = false; break; } } if (found) { // Skipping hidden types are useful for hiding some functions from other namespaces // This won't stop this type from apparing in same namespace tho if (skipHidden && cb.HasAttribute("hide")) { continue; } else { return(cb); } } } return(null); }
public GamaFunctionRef(GamaTypeRef ret, GamaParamList parms, GamaTypeRef ty, LLVMValueRef val, bool ismethod) : base(ty, val, true) { Blocks = new List <ObjectGroup <GamaBlockRef> >(); ReturnType = ret; Parameters = parms; Attributes = new GamaAttributeSet(); IsMethod = ismethod; }