From 4f40eb7f55e580675f85086709986c971f4872a9 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 20 Oct 2013 10:33:40 +0200 Subject: APIDump: Fixed listing undocumented objects. Classes with undefined "Functions" section would not list their functions as undocumented; similar for "Constants" and "Variables". --- MCServer/Plugins/APIDump/main.lua | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua index 75fc15965..f47d9c25a 100644 --- a/MCServer/Plugins/APIDump/main.lua +++ b/MCServer/Plugins/APIDump/main.lua @@ -89,7 +89,9 @@ function CreateAPITables() {Name = "IsInside"} }, Constants = { - } + }, + Variables = { + }, Descendants = {}, -- Will be filled by ReadDescriptions(), array of class APIs (references to other member in the tree) }}, { @@ -98,12 +100,14 @@ function CreateAPITables() {Name = "Clear"}, {Name = "CopyFrom"}, ... - } + }, Constants = { {Name = "baTypes", Value = 0}, {Name = "baMetas", Value = 1}, ... - } + }, + Variables = { + }, ... }} }; @@ -464,6 +468,12 @@ function ReadDescriptions(a_API) -- Replace functions with their described and overload-expanded versions: cls.Functions = DoxyFunctions; + else -- if (APIDesc.Functions ~= nil) + for j, func in ipairs(cls.Functions) do + if not(IsFunctionIgnored(cls.Name .. "." .. FnName)) then + table.insert(cls.UndocumentedFunctions, FnName); + end + end end -- if (APIDesc.Functions ~= nil) if (APIDesc.Constants ~= nil) then @@ -480,7 +490,13 @@ function ReadDescriptions(a_API) CnDesc.IsExported = true; end end -- for j, cons - end -- if (APIDesc.Constants ~= nil) + else -- if (APIDesc.Constants ~= nil) + for j, cons in ipairs(cls.Constants) do + if not(IsConstantIgnored(cls.Name .. "." .. cons.Name)) then + table.insert(cls.UndocumentedConstants, cons.Name); + end + end + end -- else if (APIDesc.Constants ~= nil) -- Assign member variables' descriptions: if (APIDesc.Variables ~= nil) then @@ -498,7 +514,13 @@ function ReadDescriptions(a_API) end end end -- for j, var - end -- if (APIDesc.Variables ~= nil) + else -- if (APIDesc.Variables ~= nil) + for j, var in ipairs(cls.Variables) do + if not(IsVariableIgnored(cls.Name .. "." .. var.Name)) then + table.insert(cls.UndocumentedVariables, var.Name); + end + end + end -- else if (APIDesc.Variables ~= nil) else -- if (APIDesc ~= nil) -- cgit v1.2.3