/** * get the prototype of any doc-object (either a prototype, a function or a tag) */ function getDocPrototype (obj) { var tmp = obj; while (tmp!=null && tmp.getType () != this.PROTOTYPE) { tmp = tmp.getParentElement (); } return tmp; } /** * get a prototype of this docapplication, ie get on of the children of this object */ function getPrototype (name) { return this.getChildElement ("prototype_" + name); } function getDir (dir, obj) { dir.mkdir (); if (obj.getType () == this.APPLICATION) { return dir; } else { var protoObj = this.getDocPrototype (obj); var dir = new File (dir, protoObj.getElementName ()); dir.mkdir (); return dir; } } function renderApi() { var prefix = this.href (""); this.storePage (this, "main", "", "index.html"); this.storePage (this, "prototypes"); this.storePage (this, "summary"); this.storePage (this, "functionindex"); var ct = 4; var arr = this.listChildren (); for (var i=0; i