JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / Introspect / Property.js
1 //<script type="text/javascript">
2 //Gtk = imports.gi.Gtk;
3 GI      = imports.gi.GIRepository;
4
5
6
7 XObject     = imports.XObject.XObject;
8 console     = imports.console.console;
9 NameSpace   = imports.NameSpace.NameSpace;
10
11 Basic        = imports.Basic.Basic;
12
13    
14
15
16 /**
17  * Property
18  */
19
20 Property = XObject.define(
21     function(prop, memberOf, saveto, keylist) {
22         this.propertyType = 'Property';
23         var n_original = GI.base_info_get_name(prop);
24         this.name  =  n_original.replace(/\-/g, '_') ,
25         this.type  = this.typeToName(GI.property_info_get_type(prop)),
26         this.flags =  GI.property_info_get_flags(prop),
27         this.memberOf = memberOf.alias
28         memberOf[saveto].push(this);
29         keylist.push(this.name);
30         this.desc = NameSpace.doc(this.memberOf + '.' + n_original);
31         
32
33         if (typeof(this.type) == 'string' && this.type.indexOf('.') > -1) {
34         
35             NameSpace.references[this.type] = NameSpace.references[this.type] || [];
36             NameSpace.references[this.type].push(this);
37         }
38         
39     },
40     Basic
41 );