Browse Source

Merge pull request #367 from christopherreed/luadoc-note-disable_gc

Lua documentation - document non garbage collected classes.
Ivan Safrin 12 years ago
parent
commit
bbcd0e9307

+ 3 - 0
Bindings/Scripts/create_lua_library/create_lua_library.py

@@ -208,6 +208,9 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 				if 'doxygen' in c:
 					luaDocOut += "\t\t<desc><![CDATA[%s]]></desc>\n" % (cleanDocs(c['doxygen']))
 
+				if ckey in disable_gc:
+					luaDocOut += "\t\t<class_notes>NOTE: %s instances are not automatically garbage collected.</class_notes>\n" % (ckey)
+				
 				parsed_methods = [] # Def: List of discovered methods
 				ignore_methods = ["readByte32", "readByte16", "getCustomEntitiesByType", "Core", "Renderer", "Shader", "Texture", "handleEvent", "secondaryHandler", "getSTLString", "readInt"]
 				luaClassBindingOut += "\n\n"

+ 4 - 0
Documentation/Lua/scripts/make_html.py

@@ -138,6 +138,10 @@ def makePage(item, classList, classListPlain, moduleName):
 		descText = desc[0].childNodes[0].data
 	html += "\t\t\t\t\t<div class=\"class_desc\">%s</div>\n" % descText
 
+	classNotes = item.getElementsByTagName('class_notes')
+	for nn in classNotes:
+		html += "\t\t\t\t\t<div class=\"class_desc\">%s</div>\n" % nn.childNodes[0].data
+
 	if len(item.getElementsByTagName('static_member')) > 0:
 		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"