JSDOC/SymbolSet.js
[gnome.introspection-doc-generator] / JSDOC / SymbolSet.js
index c7ddd1f..e17e12c 100644 (file)
@@ -17,11 +17,15 @@ SymbolSet = XObject.define(
     Object,
     {
         
+        _index : false,
+        
+        
         init : function() {
             this._index = {};
         },
 
-        keys : function() {
+        keys : function() 
+        {
             var found = [];
             for (var p in this._index) {
                 found.push(p);
@@ -31,7 +35,8 @@ SymbolSet = XObject.define(
 
 
         hasSymbol : function(alias) {
-            return this.keys().indexOf(alias) > -1;
+            return typeof(this._index[alias]) != 'undefined';
+            //return this.keys().indexOf(alias) > -1;
         },
 
         addSymbol : function(symbol) {
@@ -56,6 +61,17 @@ SymbolSet = XObject.define(
             }
             return found;
         },
+        /**
+         * for serializing
+         */
+        toJSON : function() {
+            return {
+                _object : 'SymbolSet',
+                _index : this.index;
+            }
+            
+        },
+
 
         deleteSymbol : function(alias) {
             if (!this.hasSymbol(alias)) return;
@@ -229,10 +245,10 @@ SymbolSet = XObject.define(
                     if (contributer) {
                         contributer.childClasses.push(symbol.alias);
                         symbol.inheritsFrom.push(contributer.alias);
-                        if (!isUnique(symbol.inheritsFrom)) {
-                            imports.BuildDocs.Options.LOG.warn("Can't resolve augments: Circular reference: "+symbol.alias+" inherits from "+contributer.alias+" more than once.");
-                        }
-                        else {
+                        //if (!isUnique(symbol.inheritsFrom)) {
+                        //    imports.BuildDocs.Options.LOG.warn("Can't resolve augments: Circular reference: "+symbol.alias+" inherits from "+contributer.alias+" more than once.");
+                        //}
+                        //else {
                             var cmethods = contributer.methods;
                             var cproperties = contributer.properties;
                             var cfgs = contributer.cfgs;
@@ -247,7 +263,7 @@ SymbolSet = XObject.define(
                             }
                             
                                 
-                        }
+                        //}
                     }
                     else {
                         
@@ -305,12 +321,8 @@ SymbolSet = XObject.define(
             addAugments(symbol.augments, true);
             //while(addAugments(symbol.augments) >  0) { }
             
-        },
-        
-        toArray : function()
-        {
-            
-           }
+        }
+         
 })
 
 SymbolSet.isBuiltin = function(name) {