|
@@ -31,39 +31,19 @@ globalFooter += "\t\t</div>\n"
|
|
|
globalFooter += "\t</body>\n"
|
|
globalFooter += "\t</body>\n"
|
|
|
globalFooter += "\t</html>\n"
|
|
globalFooter += "\t</html>\n"
|
|
|
|
|
|
|
|
-def makePage(item, classList):
|
|
|
|
|
- html = globalHeader
|
|
|
|
|
- html += classList
|
|
|
|
|
-
|
|
|
|
|
- html += "\t\t\t\t<div class=\"class_main\">\n"
|
|
|
|
|
-
|
|
|
|
|
- html += "\t\t\t\t\t<div class=\"class_name\">%s</div>\n" % (item.attributes["name"].value)
|
|
|
|
|
- desc = item.getElementsByTagName('desc')
|
|
|
|
|
- descText = "No description."
|
|
|
|
|
- if len(desc) > 0:
|
|
|
|
|
- descText = desc[0].childNodes[0].data
|
|
|
|
|
- html += "\t\t\t\t\t<div class=\"class_desc\">%s</div>\n" % descText
|
|
|
|
|
-
|
|
|
|
|
- html += "\t\t\t\t\t<div class=\"class_properies\">\n"
|
|
|
|
|
- html += "\t\t\t\t\t\t<div class=\"class_properies_title\">Properties</div>\n"
|
|
|
|
|
- html += "\t\t\t\t\t\t<div class=\"class_properies_list\">\n"
|
|
|
|
|
- for subitem in item.getElementsByTagName('member'):
|
|
|
|
|
- html += "\t\t\t\t\t\t\t<div class=\"class_property\">\n"
|
|
|
|
|
- html += "\t\t\t\t\t\t\t\t<div class=\"class_property_name\">%s</div>\n" % (subitem.attributes["name"].value)
|
|
|
|
|
- html += "\t\t\t\t\t\t\t\t<div class=\"class_property_type\">%s</div>\n" % (subitem.attributes["type"].value)
|
|
|
|
|
- desc = subitem.getElementsByTagName('desc')
|
|
|
|
|
- descText = "No description."
|
|
|
|
|
- if len(desc) > 0:
|
|
|
|
|
- descText = desc[0].childNodes[0].data
|
|
|
|
|
- html += "\t\t\t\t\t\t\t\t<div class=\"class_property_desc\">%s</div>\n" % (descText)
|
|
|
|
|
- html += "\t\t\t\t\t\t\t</div>\n"
|
|
|
|
|
- html += "\t\t\t\t\t\t</div>\n"
|
|
|
|
|
- html += "\t\t\t\t\t</div>\n"
|
|
|
|
|
-
|
|
|
|
|
|
|
+def createMethods(className, item, static):
|
|
|
|
|
+ html = ""
|
|
|
html += "\t\t\t\t\t<div class=\"class_methods\">\n"
|
|
html += "\t\t\t\t\t<div class=\"class_methods\">\n"
|
|
|
- html += "\t\t\t\t\t\t<div class=\"class_methods_title\">Functions</div>\n"
|
|
|
|
|
|
|
+ if static == True:
|
|
|
|
|
+ html += "\t\t\t\t\t\t<div class=\"class_methods_title\">Static Functions</div>\n"
|
|
|
|
|
+ else:
|
|
|
|
|
+ html += "\t\t\t\t\t\t<div class=\"class_methods_title\">Functions</div>\n"
|
|
|
html += "\t\t\t\t\t\t<div class=\"class_methods_list\">\n"
|
|
html += "\t\t\t\t\t\t<div class=\"class_methods_list\">\n"
|
|
|
for subitem in item.getElementsByTagName('method'):
|
|
for subitem in item.getElementsByTagName('method'):
|
|
|
|
|
+ if static == True and subitem.hasAttribute("static") == False:
|
|
|
|
|
+ continue
|
|
|
|
|
+ if static == False and subitem.hasAttribute("static") == True:
|
|
|
|
|
+ continue
|
|
|
html += "\t\t\t\t\t\t\t<div class=\"class_method\">\n"
|
|
html += "\t\t\t\t\t\t\t<div class=\"class_method\">\n"
|
|
|
paramList = ""
|
|
paramList = ""
|
|
|
paramIndex = 0
|
|
paramIndex = 0
|
|
@@ -73,7 +53,10 @@ def makePage(item, classList):
|
|
|
paramList += ", "
|
|
paramList += ", "
|
|
|
paramList += " <span class=\"inline_type\">%s</span> <span class=\"inline_param\">%s</span> " % (param.attributes["type"].value, param.attributes["name"].value)
|
|
paramList += " <span class=\"inline_type\">%s</span> <span class=\"inline_param\">%s</span> " % (param.attributes["type"].value, param.attributes["name"].value)
|
|
|
paramIndex = paramIndex + 1
|
|
paramIndex = paramIndex + 1
|
|
|
- html += "\t\t\t\t\t\t\t\t<div class=\"class_method_name\">%s (%s) </div>\n" % (subitem.attributes["name"].value, paramList)
|
|
|
|
|
|
|
+ if static == True:
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_method_name\">%s.%s (%s) </div>\n" % (className, subitem.attributes["name"].value, paramList)
|
|
|
|
|
+ else:
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_method_name\">%s (%s) </div>\n" % (subitem.attributes["name"].value, paramList)
|
|
|
|
|
|
|
|
html += "\t\t\t\t\t\t\t\t<div class=\"class_method_type\">%s</div>\n" % (subitem.attributes["return_type"].value)
|
|
html += "\t\t\t\t\t\t\t\t<div class=\"class_method_type\">%s</div>\n" % (subitem.attributes["return_type"].value)
|
|
|
desc = subitem.getElementsByTagName('desc')
|
|
desc = subitem.getElementsByTagName('desc')
|
|
@@ -102,6 +85,64 @@ def makePage(item, classList):
|
|
|
|
|
|
|
|
html += "\t\t\t\t\t\t</div>\n"
|
|
html += "\t\t\t\t\t\t</div>\n"
|
|
|
html += "\t\t\t\t\t</div>\n"
|
|
html += "\t\t\t\t\t</div>\n"
|
|
|
|
|
+ return html
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+def makePage(item, classList, classListPlain, moduleName):
|
|
|
|
|
+ html = globalHeader
|
|
|
|
|
+ html += classList
|
|
|
|
|
+
|
|
|
|
|
+ html += "\t\t\t\t<div class=\"class_main\">\n"
|
|
|
|
|
+
|
|
|
|
|
+ if item.hasAttribute("extends"):
|
|
|
|
|
+ extendModulePrefix = moduleName
|
|
|
|
|
+ if item.attributes["extends"].value not in classListPlain:
|
|
|
|
|
+ extendModulePrefix = "Polycode"
|
|
|
|
|
+ html += "\t\t\t\t\t<div class=\"class_name\">%s <span class=\"class_extends\">extends</span> <span class=\"class_extends_class\"><a href=\"../%s/%s.html\">%s</a></span></div>\n" % (item.attributes["name"].value, extendModulePrefix, item.attributes["extends"].value, item.attributes["extends"].value)
|
|
|
|
|
+ else:
|
|
|
|
|
+ html += "\t\t\t\t\t<div class=\"class_name\">%s</div>\n" % (item.attributes["name"].value)
|
|
|
|
|
+
|
|
|
|
|
+ desc = item.getElementsByTagName('desc')
|
|
|
|
|
+ descText = "No description."
|
|
|
|
|
+ if len(desc) > 0:
|
|
|
|
|
+ descText = desc[0].childNodes[0].data
|
|
|
|
|
+ html += "\t\t\t\t\t<div class=\"class_desc\">%s</div>\n" % descText
|
|
|
|
|
+
|
|
|
|
|
+ html += "\t\t\t\t\t<div class=\"class_properties\">\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t<div class=\"class_properties_title\">Static Properties</div>\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t<div class=\"class_properties_list\">\n"
|
|
|
|
|
+ for subitem in item.getElementsByTagName('static_member'):
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t<div class=\"class_property\">\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_property_name\">%s.%s <span class=\"static_value\">= %s</span></div>\n" % (item.attributes["name"].value, subitem.attributes["name"].value, subitem.attributes["value"].value)
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_property_type\">%s</div>\n" % (subitem.attributes["type"].value)
|
|
|
|
|
+ desc = subitem.getElementsByTagName('desc')
|
|
|
|
|
+ descText = "No description."
|
|
|
|
|
+ if len(desc) > 0:
|
|
|
|
|
+ descText = desc[0].childNodes[0].data
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_property_desc\">%s</div>\n" % (descText)
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t</div>\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t</div>\n"
|
|
|
|
|
+ html += "\t\t\t\t\t</div>\n"
|
|
|
|
|
+
|
|
|
|
|
+ html += "\t\t\t\t\t<div class=\"class_properties\">\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t<div class=\"class_properties_title\">Properties</div>\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t<div class=\"class_properties_list\">\n"
|
|
|
|
|
+ for subitem in item.getElementsByTagName('member'):
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t<div class=\"class_property\">\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_property_name\">%s</div>\n" % (subitem.attributes["name"].value)
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_property_type\">%s</div>\n" % (subitem.attributes["type"].value)
|
|
|
|
|
+ desc = subitem.getElementsByTagName('desc')
|
|
|
|
|
+ descText = "No description."
|
|
|
|
|
+ if len(desc) > 0:
|
|
|
|
|
+ descText = desc[0].childNodes[0].data
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t\t<div class=\"class_property_desc\">%s</div>\n" % (descText)
|
|
|
|
|
+ html += "\t\t\t\t\t\t\t</div>\n"
|
|
|
|
|
+ html += "\t\t\t\t\t\t</div>\n"
|
|
|
|
|
+ html += "\t\t\t\t\t</div>\n"
|
|
|
|
|
+
|
|
|
|
|
+ html += createMethods(item.attributes["name"].value, item, True)
|
|
|
|
|
+ html += createMethods(item.attributes["name"].value, item, False)
|
|
|
|
|
+
|
|
|
|
|
|
|
|
html += "\t\t\t\t</div>\n"
|
|
html += "\t\t\t\t</div>\n"
|
|
|
return html
|
|
return html
|
|
@@ -115,8 +156,10 @@ def makeHTML(fileName, moduleName):
|
|
|
|
|
|
|
|
classList = ""
|
|
classList = ""
|
|
|
classList += "\t\t\t<div id=\"class_list\">\n"
|
|
classList += "\t\t\t<div id=\"class_list\">\n"
|
|
|
|
|
+ classListPlain = []
|
|
|
for item in dom.documentElement.getElementsByTagName('class'):
|
|
for item in dom.documentElement.getElementsByTagName('class'):
|
|
|
classList += "\t\t\t\t<div class=\"class_entry\"><a href=\"%s.html\">%s</a></div>\n" % (item.attributes["name"].value, item.attributes["name"].value)
|
|
classList += "\t\t\t\t<div class=\"class_entry\"><a href=\"%s.html\">%s</a></div>\n" % (item.attributes["name"].value, item.attributes["name"].value)
|
|
|
|
|
+ classListPlain.append(item.attributes["name"].value)
|
|
|
classList += "\t\t\t</div>\n"
|
|
classList += "\t\t\t</div>\n"
|
|
|
classList += "\n"
|
|
classList += "\n"
|
|
|
|
|
|
|
@@ -133,7 +176,7 @@ def makeHTML(fileName, moduleName):
|
|
|
|
|
|
|
|
for item in dom.documentElement.getElementsByTagName('class'):
|
|
for item in dom.documentElement.getElementsByTagName('class'):
|
|
|
f = open("../html/%s/%s.html" % (moduleName, item.attributes["name"].value), 'w')
|
|
f = open("../html/%s/%s.html" % (moduleName, item.attributes["name"].value), 'w')
|
|
|
- html = makePage(item, classList)
|
|
|
|
|
|
|
+ html = makePage(item, classList, classListPlain, moduleName)
|
|
|
f.write(html)
|
|
f.write(html)
|
|
|
f.close()
|
|
f.close()
|
|
|
|
|
|