1 2var GDC = { 3 tmpl : {} 4}; 5 6GDC.unserialize = function(serializedString){ 7 var str = decodeURI(serializedString); 8 var pairs = str.split('&'); 9 var obj = {}, p, idx, val; 10 for (var i=0, n=pairs.length; i < n; i++) { 11 p = pairs[i].split('='); 12 idx = p[0]; 13 14 if (idx.indexOf("[]") == (idx.length - 2)) { 15 // Eh um vetor 16 var ind = idx.substring(0, idx.length-2) 17 if (obj[ind] === undefined) { 18 obj[ind] = []; 19 } 20 obj[ind].push(p[1]); 21 } 22 else { 23 obj[idx] = p[1]; 24 } 25 } 26 return obj; 27}; 28 29 30GDC.makeSingleton = function(theClass) { 31 theClass.getInstance = function() { 32 return theClass.__singletonInstance || theClass.setInstance.apply(this, arguments); 33 }; 34 theClass.setInstance = function() { 35 return theClass.__singletonInstance = new theClass(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6],arguments[7]); 36 }; 37 theClass.deleteInstance = function() { 38 theClass.__singletonInstance = null; 39 }; 40};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.