public VMSignature(Parameters parms) { bool has_cb = parms.HideData; for (int i = 1; i < parms.Count; i++) { Parameter p = parms [i]; if (i > 1 && p.IsLength && parms [i - 1].IsString) continue; if (p.IsCount && ((i > 1 && parms [i - 1].IsArray) || (i < parms.Count - 1 && parms [i + 1].IsArray))) continue; has_cb = has_cb || p.Generatable is CallbackGen; if (p.IsUserData && has_cb) continue; if (p.CType == "GError**") continue; if (p.Scope == "notified") i += 2; this.parms.Add (p); } }
public CallbackGen(XmlElement ns, XmlElement elem) : base(ns, elem) { retval = new ReturnValue (elem ["return-type"]); parms = new Parameters (elem ["parameters"]); parms.HideData = true; }
public ManagedCallString (Parameters parms) { for (int i = 0; i < parms.Count; i ++) { Parameter p = parms [i]; if (p.IsLength && i > 0 && parms [i-1].IsString) continue; else if (p.Scope == "notified") { user_data_param = parms[i+1].Name; destroy_param = parms[i+2].Name; i += 2; } else if (p.IsUserData && parms.IsHidden (p)) { user_data_param = p.Name; continue; } else if (p is ErrorParameter) { error_param = p.Name; continue; } this.parms.Add (p); if (p.PassAs != String.Empty && (p.Name != p.FromNative (p.Name))) this.special.Add (true); else if (p.Generatable is CallbackGen) this.special.Add (true); else if (p.Scope == "call") this.special.Add (true); else this.special.Add (false); } }
public VirtualMethod (XmlElement elem, ClassBase container_type) : base (elem, container_type) { this.elem = elem; retval = new ReturnValue (elem ["return-type"]); parms = new Parameters (elem["parameters"]); parms.HideData = true; }
public Signature(Parameters parms) { foreach (Parameter p in parms) { if (!parms.IsHidden (p)) this.parms.Add (p); } }
public ManagedCallString (Parameters parms) { for (int i = 0; i < parms.Count; i ++) { Parameter p = parms [i]; if (p.IsLength && i > 0 && parms [i-1].IsString) continue; else if (p.Scope == "notified") { user_data_param = parms[i+1].Name; destroy_param = parms[i+2].Name; i += 2; } else if ((p.IsCount || p.IsUserData) && parms.IsHidden (p)) { user_data_param = p.Name; continue; } else if (p is ErrorParameter) { error_param = p.Name; continue; } bool special = false; if (p.PassAs != String.Empty && (p.Name != p.FromNative (p.Name))) special = true; else if (p.Generatable is CallbackGen) special = true; this.parms.Add (p, special); if (p.IsOwnable) { dispose_params.Add (p); } } }
public VirtualMethod (XmlElement elem, ObjectBase container_type) : base (elem, container_type) { if (container_type.ParserVersion == 1) { // The old pre 2.14 parser didn't drop the 1st parameter in all <signal> and <virtual_method> elements parms = new Parameters (elem ["parameters"], true); } retval = new ReturnValue (elem ["return-type"]); }
public Signal(XmlElement elem, ObjectBase container_type) { this.elem = elem; name = elem.GetAttribute ("name"); marshaled = elem.GetAttribute ("manual") == "true"; retval = new ReturnValue (elem ["return-type"]); parms = new Parameters (elem["parameters"], container_type.ParserVersion == 1 ? true : false); this.container_type = container_type; }
protected MethodBase(XmlElement elem, ClassBase container_type) { this.elem = elem; this.container_type = container_type; this.name = elem.GetAttribute ("name"); parms = new Parameters (elem ["parameters"]); IsStatic = elem.GetAttribute ("shared") == "true"; if (elem.HasAttribute ("new_flag")) mods = "new "; if (elem.HasAttribute ("accessibility")) { string attr = elem.GetAttribute ("accessibility"); switch (attr) { case "public": case "protected": case "internal": case "private": case "protected internal": protection = attr; break; } } }
public MethodBody(Parameters parms) { parameters = parms; }
public CallbackGen(XmlElement ns, XmlElement elem) : base(ns, elem) { retval = new ReturnValue(elem ["return-type"]); parms = new Parameters(elem ["parameters"]); parms.HideData = true; }
public FuncGen (String ns, XmlElement elem) : base (ns, elem) { if (elem ["parameters"] != null) parms = new Parameters (elem ["parameters"]); }