lib/ProfileIndex.js
function() {
		var code = "";

		// Collect object initializers
		for (var i=0, l=this.index.length; i<l; ++i) {
			var o = this.index[i];
			code += "/**\n * Factory & Initializer of "+o.name+"\n */\n";
			code += "var factory_"+o.safeName+" = {\n";
			code += this.indent + "props: "+o.properties.length+",\n";
			code += this.indent + "create: function() {\n";
			code += this.indent + this.indent + "return " + o.generateFactory() + ";\n";
			code += this.indent + "},\n";
			code += this.indent + "init: function(inst, props, pagesize, offset) {\n";
			code += o.generateInitializer('inst','props','pagesize','offset',this.indent+this.indent, this.indent);
			code += this.indent + "}\n";
			code += "}\n\n";
		}

		return code;
	}
function() {
		var code = "";

		// Collect object initializers
		for (var i=0, l=this.index.length; i<l; ++i) {
			var o = this.index[i];
			code += "/**\n * Factory & Initializer of "+o.name+"\n */\n";
			code += "var factory_"+o.safeName+" = {\n";
			code += this.indent + "props: "+o.properties.length+",\n";
			code += this.indent + "create: function() {\n";
			code += this.indent + this.indent + "return " + o.generateFactory() + ";\n";
			code += this.indent + "},\n";
			code += this.indent + "init: function(inst, props, pagesize, offset) {\n";
			code += o.generateInitializer('inst','props','pagesize','offset',this.indent+this.indent, this.indent);
			code += this.indent + "}\n";
			code += "}\n\n";
		}

		return code;
	}
function ( ) { var code = "" ; // Collect object initializers for ( var i = 0 , l = this . index . length ; i < l ; ++ i ) { var o = this . index [ i ] ; code += "/**\n * Factory & Initializer of " + o . name + "\n */\n" ; code += "var factory_" + o . safeName + " = {\n" ; code += this . indent + "props: " + o . properties . length + ",\n" ; code += this . indent + "create: function() {\n" ; code += this . indent + this . indent + "return " + o . generateFactory ( ) + ";\n" ; code += this . indent + "},\n" ; code += this . indent + "init: function(inst, props, pagesize, offset) {\n" ; code += o . generateInitializer ( 'inst' , 'props' , 'pagesize' , 'offset' , this . indent + this . indent , this . indent ) ; code += this . indent + "}\n" ; code += "}\n\n" ; } return code ; }
Generate the list of init functions used by the lookup fcatory
to generate the items
Generate the list of init functions used by the lookup fcatory to generate the items