Add support for specifying other default values for return values

This allows us the override the base.SomeVMethod return values in case
the native type doesn't implement the VM.
This commit is contained in:
Sebastian Dröge 2009-09-23 07:10:36 +02:00
parent 102f895fb6
commit fc4c56bfa3

View file

@ -43,6 +43,7 @@ namespace GtkSharp.Generation {
owned = elem.GetAttribute ("owned") == "true";
ctype = elem.GetAttribute("type");
element_ctype = elem.GetAttribute ("element_type");
default_value = elem.GetAttribute ("default_value");
}
}
@ -64,8 +65,11 @@ namespace GtkSharp.Generation {
}
}
private string default_value = null;
public string DefaultValue {
get {
if (default_value != null && default_value != String.Empty)
return default_value;
if (IGen == null)
return String.Empty;
return IGen.DefaultValue;