JSDOC/TokenReader.js
[gnome.introspection-doc-generator] / Introspect / Union.js
1 //<script type="text/javascript">
2
3 GI      = imports.gi.GIRepository;
4
5
6
7 XObject     = imports.XObject.XObject;
8 console     = imports.console.console;
9  
10 Base        = imports.Base.Base;
11
12   
13    
14
15 /**
16  * Union
17  */
18  
19 Union = XObject.define(
20     function(ns, name) {
21         Base.call(this, ns, name);
22        
23     }, 
24     Base, 
25     {
26         titleType: 'Union',
27         _loaded : false,
28         load : function()
29         {
30             if (this._loaded) {
31                 return; // already loaded..
32             }
33             // my props..
34             var props = [];
35             this.genericBuildList('union', 'field', props, 'properties');
36             
37             if (GI.union_info_get_size (this.getBI()) > 0 ) { 
38                 
39                 this.constructors.push({
40                     name : '',
41                     params: [],
42                     returns :  [],
43                     isConstructor : true,
44                     isStatic : false,
45                     memberOf : this.alias,
46                     exceptions : [],
47                     desc : ''
48                 });
49             }
50             var methods = [];
51             this.genericBuildList('union', 'method', methods, 'methods');
52               
53             this._loaded  = true;
54         }
55          
56
57 });
58