7 - return this.ns + this.name;
8 + // not sure if fqn really is correct here...
10 + return this.nodetype == "Class" || this.nodetype=="Interface"
11 + ? this.name : (this.ns + this.name);
14 public void copyFrom(GirObject pcls, bool is_interface)
17 this.inherits.add(pcls.fqn());
19 + var liter = pcls.inherits.list_iterator();
20 + while(liter.next()) {
21 + if (this.inherits.contains(liter.get())) {
24 + this.inherits.add(liter.get());
28 var iter = pcls.methods.map_iterator();
30 if (null != this.methods.get(iter.get_key())) {
34 // is_arary / is_instance / is_varargs..
37 + if (this.inherits.size > 0) {
38 + r.set_array_member("inherits", this.toJSONArrayString(this.inherits));
41 if (this.implements.size > 0) {
42 - r.set_array_member("length", this.toJSONArrayString(this.implements));
43 + r.set_array_member("implements", this.toJSONArrayString(this.implements));
46 if (this.params.size > 0) {
54 public GirObject fetchByFqn(string fqn) {
55 //print("Searching (%s)%s for %s\n", this.nodetype, this.name, fqn);
56 var bits = fqn.split(".");
59 var iter = g.includes.map_iterator();
61 + // skip empty namespaces on include..?
62 + if ( iter.get_key() == "") {
65 var ret = fqtypeLookup(type, iter.get_key());
77 public static string guessDefaultValueForType(string type) {
78 - if (type.contains(".")) {
79 + //print("guessDefaultValueForType: %s\n", type);
80 + if (type.length < 1 || type.contains(".")) {
85 public void walk(Xml.Node* element, GirObject? parent)
87 var n = element->get_prop("name");
90 + // ignore null or c:include...
91 + if (n == null || (element->ns->prefix != null && element->ns->prefix == "c")) {
94 - //print(element->name + " (" + parent.name + "==>" + n +")\n");
95 + //print("%s:%s (%s ==> %s\n", element->ns->prefix , element->name , parent.name , n);
96 switch (element->name) {
102 case "instance-parameter":
104 + // looks like this is the C first arg, that is ignored (as it is
105 + // treated as 'this' )
106 var c = new GirObject("Param",n);
107 - c.gparent = parent;
109 + c.gparent = parent;
111 c.is_instance = true;
112 parent.params.add(c);