add template_type for ImVector templates in structs_and_enums

This commit is contained in:
sonoro1234
2018-10-14 17:47:38 +02:00
parent 51f02dca4d
commit 804acdcecd
3 changed files with 66 additions and 45 deletions

View File

@@ -923,8 +923,10 @@ local function gen_structs_and_enums_table(cdefs)
end
--split type name1,name2; in several lines
local typen,rest = line:match("([^,]+)%s(%S+[,;])")
local template_type = typen:match("/%*<(.+)>%*/")
if template_type then typen = typen:match("(.+)/%*") end
for name in rest:gmatch("([^%s,;]+)%s?[,;]") do
table.insert(outtab.structs[structnames[#structnames]],{type=typen,name=name})
table.insert(outtab.structs[structnames[#structnames]],{type=typen,template_type=template_type,name=name})
end
end
end

File diff suppressed because one or more lines are too long

View File

@@ -1191,13 +1191,16 @@ defs["structs"]["ImDrawVert"][3]["type"] = "ImU32"
defs["structs"]["ImDrawVert"][3]["name"] = "col"
defs["structs"]["ImDrawList"] = {}
defs["structs"]["ImDrawList"][1] = {}
defs["structs"]["ImDrawList"][1]["type"] = "ImVector/*<ImDrawCmd>*/"
defs["structs"]["ImDrawList"][1]["type"] = "ImVector"
defs["structs"]["ImDrawList"][1]["template_type"] = "ImDrawCmd"
defs["structs"]["ImDrawList"][1]["name"] = "CmdBuffer"
defs["structs"]["ImDrawList"][2] = {}
defs["structs"]["ImDrawList"][2]["type"] = "ImVector/*<ImDrawIdx>*/"
defs["structs"]["ImDrawList"][2]["type"] = "ImVector"
defs["structs"]["ImDrawList"][2]["template_type"] = "ImDrawIdx"
defs["structs"]["ImDrawList"][2]["name"] = "IdxBuffer"
defs["structs"]["ImDrawList"][3] = {}
defs["structs"]["ImDrawList"][3]["type"] = "ImVector/*<ImDrawVert>*/"
defs["structs"]["ImDrawList"][3]["type"] = "ImVector"
defs["structs"]["ImDrawList"][3]["template_type"] = "ImDrawVert"
defs["structs"]["ImDrawList"][3]["name"] = "VtxBuffer"
defs["structs"]["ImDrawList"][4] = {}
defs["structs"]["ImDrawList"][4]["type"] = "ImDrawListFlags"
@@ -1218,13 +1221,16 @@ defs["structs"]["ImDrawList"][9] = {}
defs["structs"]["ImDrawList"][9]["type"] = "ImDrawIdx*"
defs["structs"]["ImDrawList"][9]["name"] = "_IdxWritePtr"
defs["structs"]["ImDrawList"][10] = {}
defs["structs"]["ImDrawList"][10]["type"] = "ImVector/*<ImVec4>*/"
defs["structs"]["ImDrawList"][10]["type"] = "ImVector"
defs["structs"]["ImDrawList"][10]["template_type"] = "ImVec4"
defs["structs"]["ImDrawList"][10]["name"] = "_ClipRectStack"
defs["structs"]["ImDrawList"][11] = {}
defs["structs"]["ImDrawList"][11]["type"] = "ImVector/*<ImTextureID>*/"
defs["structs"]["ImDrawList"][11]["type"] = "ImVector"
defs["structs"]["ImDrawList"][11]["template_type"] = "ImTextureID"
defs["structs"]["ImDrawList"][11]["name"] = "_TextureIdStack"
defs["structs"]["ImDrawList"][12] = {}
defs["structs"]["ImDrawList"][12]["type"] = "ImVector/*<ImVec2>*/"
defs["structs"]["ImDrawList"][12]["type"] = "ImVector"
defs["structs"]["ImDrawList"][12]["template_type"] = "ImVec2"
defs["structs"]["ImDrawList"][12]["name"] = "_Path"
defs["structs"]["ImDrawList"][13] = {}
defs["structs"]["ImDrawList"][13]["type"] = "int"
@@ -1233,7 +1239,8 @@ defs["structs"]["ImDrawList"][14] = {}
defs["structs"]["ImDrawList"][14]["type"] = "int"
defs["structs"]["ImDrawList"][14]["name"] = "_ChannelsCount"
defs["structs"]["ImDrawList"][15] = {}
defs["structs"]["ImDrawList"][15]["type"] = "ImVector/*<ImDrawChannel>*/"
defs["structs"]["ImDrawList"][15]["type"] = "ImVector"
defs["structs"]["ImDrawList"][15]["template_type"] = "ImDrawChannel"
defs["structs"]["ImDrawList"][15]["name"] = "_Channels"
defs["structs"]["Pair"] = {}
defs["structs"]["Pair"][1] = {}
@@ -1253,13 +1260,16 @@ defs["structs"]["ImFont"][3] = {}
defs["structs"]["ImFont"][3]["type"] = "ImVec2"
defs["structs"]["ImFont"][3]["name"] = "DisplayOffset"
defs["structs"]["ImFont"][4] = {}
defs["structs"]["ImFont"][4]["type"] = "ImVector/*<ImFontGlyph>*/"
defs["structs"]["ImFont"][4]["type"] = "ImVector"
defs["structs"]["ImFont"][4]["template_type"] = "ImFontGlyph"
defs["structs"]["ImFont"][4]["name"] = "Glyphs"
defs["structs"]["ImFont"][5] = {}
defs["structs"]["ImFont"][5]["type"] = "ImVector/*<float>*/"
defs["structs"]["ImFont"][5]["type"] = "ImVector"
defs["structs"]["ImFont"][5]["template_type"] = "float"
defs["structs"]["ImFont"][5]["name"] = "IndexAdvanceX"
defs["structs"]["ImFont"][6] = {}
defs["structs"]["ImFont"][6]["type"] = "ImVector/*<unsigned short>*/"
defs["structs"]["ImFont"][6]["type"] = "ImVector"
defs["structs"]["ImFont"][6]["template_type"] = "unsigned short"
defs["structs"]["ImFont"][6]["name"] = "IndexLookup"
defs["structs"]["ImFont"][7] = {}
defs["structs"]["ImFont"][7]["type"] = "const ImFontGlyph*"
@@ -1350,11 +1360,13 @@ defs["structs"]["ImVec4"][4]["type"] = "float"
defs["structs"]["ImVec4"][4]["name"] = "w"
defs["structs"]["GlyphRangesBuilder"] = {}
defs["structs"]["GlyphRangesBuilder"][1] = {}
defs["structs"]["GlyphRangesBuilder"][1]["type"] = "ImVector/*<unsigned char>*/"
defs["structs"]["GlyphRangesBuilder"][1]["type"] = "ImVector"
defs["structs"]["GlyphRangesBuilder"][1]["template_type"] = "unsigned char"
defs["structs"]["GlyphRangesBuilder"][1]["name"] = "UsedChars"
defs["structs"]["ImGuiStorage"] = {}
defs["structs"]["ImGuiStorage"][1] = {}
defs["structs"]["ImGuiStorage"][1]["type"] = "ImVector/*<Pair>*/"
defs["structs"]["ImGuiStorage"][1]["type"] = "ImVector"
defs["structs"]["ImGuiStorage"][1]["template_type"] = "Pair"
defs["structs"]["ImGuiStorage"][1]["name"] = "Data"
defs["structs"]["ImFontAtlas"] = {}
defs["structs"]["ImFontAtlas"][1] = {}
@@ -1391,18 +1403,21 @@ defs["structs"]["ImFontAtlas"][11] = {}
defs["structs"]["ImFontAtlas"][11]["type"] = "ImVec2"
defs["structs"]["ImFontAtlas"][11]["name"] = "TexUvWhitePixel"
defs["structs"]["ImFontAtlas"][12] = {}
defs["structs"]["ImFontAtlas"][12]["type"] = "ImVector/*<ImFont*>*/"
defs["structs"]["ImFontAtlas"][12]["type"] = "ImVector"
defs["structs"]["ImFontAtlas"][12]["template_type"] = "ImFont*"
defs["structs"]["ImFontAtlas"][12]["name"] = "Fonts"
defs["structs"]["ImFontAtlas"][13] = {}
defs["structs"]["ImFontAtlas"][13]["type"] = "ImVector/*<CustomRect>*/"
defs["structs"]["ImFontAtlas"][13]["type"] = "ImVector"
defs["structs"]["ImFontAtlas"][13]["template_type"] = "CustomRect"
defs["structs"]["ImFontAtlas"][13]["name"] = "CustomRects"
defs["structs"]["ImFontAtlas"][14] = {}
defs["structs"]["ImFontAtlas"][14]["type"] = "ImVector/*<ImFontConfig>*/"
defs["structs"]["ImFontAtlas"][14]["type"] = "ImVector"
defs["structs"]["ImFontAtlas"][14]["template_type"] = "ImFontConfig"
defs["structs"]["ImFontAtlas"][14]["name"] = "ConfigData"
defs["structs"]["ImFontAtlas"][15] = {}
defs["structs"]["ImFontAtlas"][15]["type"] = "int"
defs["structs"]["ImFontAtlas"][15]["name"] = "CustomRectIds[1]"
defs["structs"]["ImFontAtlas"][15]["size"] = 1
defs["structs"]["ImFontAtlas"][15]["name"] = "CustomRectIds[1]"
defs["structs"]["ImFontGlyph"] = {}
defs["structs"]["ImFontGlyph"][1] = {}
defs["structs"]["ImFontGlyph"][1]["type"] = "ImWchar"
@@ -1485,8 +1500,8 @@ defs["structs"]["ImFontConfig"][16]["type"] = "float"
defs["structs"]["ImFontConfig"][16]["name"] = "RasterizerMultiply"
defs["structs"]["ImFontConfig"][17] = {}
defs["structs"]["ImFontConfig"][17]["type"] = "char"
defs["structs"]["ImFontConfig"][17]["name"] = "Name[40]"
defs["structs"]["ImFontConfig"][17]["size"] = 40
defs["structs"]["ImFontConfig"][17]["name"] = "Name[40]"
defs["structs"]["ImFontConfig"][18] = {}
defs["structs"]["ImFontConfig"][18]["type"] = "ImFont*"
defs["structs"]["ImFontConfig"][18]["name"] = "DstFont"
@@ -1514,7 +1529,8 @@ defs["structs"]["ImDrawData"][7]["type"] = "ImVec2"
defs["structs"]["ImDrawData"][7]["name"] = "DisplaySize"
defs["structs"]["ImGuiTextBuffer"] = {}
defs["structs"]["ImGuiTextBuffer"][1] = {}
defs["structs"]["ImGuiTextBuffer"][1]["type"] = "ImVector/*<char>*/"
defs["structs"]["ImGuiTextBuffer"][1]["type"] = "ImVector"
defs["structs"]["ImGuiTextBuffer"][1]["template_type"] = "char"
defs["structs"]["ImGuiTextBuffer"][1]["name"] = "Buf"
defs["structs"]["ImGuiStyle"] = {}
defs["structs"]["ImGuiStyle"][1] = {}
@@ -1606,14 +1622,16 @@ defs["structs"]["ImGuiStyle"][29]["type"] = "float"
defs["structs"]["ImGuiStyle"][29]["name"] = "CurveTessellationTol"
defs["structs"]["ImGuiStyle"][30] = {}
defs["structs"]["ImGuiStyle"][30]["type"] = "ImVec4"
defs["structs"]["ImGuiStyle"][30]["name"] = "Colors[ImGuiCol_COUNT]"
defs["structs"]["ImGuiStyle"][30]["size"] = 43
defs["structs"]["ImGuiStyle"][30]["name"] = "Colors[ImGuiCol_COUNT]"
defs["structs"]["ImDrawChannel"] = {}
defs["structs"]["ImDrawChannel"][1] = {}
defs["structs"]["ImDrawChannel"][1]["type"] = "ImVector/*<ImDrawCmd>*/"
defs["structs"]["ImDrawChannel"][1]["type"] = "ImVector"
defs["structs"]["ImDrawChannel"][1]["template_type"] = "ImDrawCmd"
defs["structs"]["ImDrawChannel"][1]["name"] = "CmdBuffer"
defs["structs"]["ImDrawChannel"][2] = {}
defs["structs"]["ImDrawChannel"][2]["type"] = "ImVector/*<ImDrawIdx>*/"
defs["structs"]["ImDrawChannel"][2]["type"] = "ImVector"
defs["structs"]["ImDrawChannel"][2]["template_type"] = "ImDrawIdx"
defs["structs"]["ImDrawChannel"][2]["name"] = "IdxBuffer"
defs["structs"]["ImDrawCmd"] = {}
defs["structs"]["ImDrawCmd"][1] = {}
@@ -1676,8 +1694,8 @@ defs["structs"]["ImGuiIO"][10]["type"] = "float"
defs["structs"]["ImGuiIO"][10]["name"] = "MouseDragThreshold"
defs["structs"]["ImGuiIO"][11] = {}
defs["structs"]["ImGuiIO"][11]["type"] = "int"
defs["structs"]["ImGuiIO"][11]["name"] = "KeyMap[ImGuiKey_COUNT]"
defs["structs"]["ImGuiIO"][11]["size"] = 21
defs["structs"]["ImGuiIO"][11]["name"] = "KeyMap[ImGuiKey_COUNT]"
defs["structs"]["ImGuiIO"][12] = {}
defs["structs"]["ImGuiIO"][12]["type"] = "float"
defs["structs"]["ImGuiIO"][12]["name"] = "KeyRepeatDelay"
@@ -1743,8 +1761,8 @@ defs["structs"]["ImGuiIO"][32]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][32]["name"] = "MousePos"
defs["structs"]["ImGuiIO"][33] = {}
defs["structs"]["ImGuiIO"][33]["type"] = "bool"
defs["structs"]["ImGuiIO"][33]["name"] = "MouseDown[5]"
defs["structs"]["ImGuiIO"][33]["size"] = 5
defs["structs"]["ImGuiIO"][33]["name"] = "MouseDown[5]"
defs["structs"]["ImGuiIO"][34] = {}
defs["structs"]["ImGuiIO"][34]["type"] = "float"
defs["structs"]["ImGuiIO"][34]["name"] = "MouseWheel"
@@ -1765,16 +1783,16 @@ defs["structs"]["ImGuiIO"][39]["type"] = "bool"
defs["structs"]["ImGuiIO"][39]["name"] = "KeySuper"
defs["structs"]["ImGuiIO"][40] = {}
defs["structs"]["ImGuiIO"][40]["type"] = "bool"
defs["structs"]["ImGuiIO"][40]["name"] = "KeysDown[512]"
defs["structs"]["ImGuiIO"][40]["size"] = 512
defs["structs"]["ImGuiIO"][40]["name"] = "KeysDown[512]"
defs["structs"]["ImGuiIO"][41] = {}
defs["structs"]["ImGuiIO"][41]["type"] = "ImWchar"
defs["structs"]["ImGuiIO"][41]["name"] = "InputCharacters[16+1]"
defs["structs"]["ImGuiIO"][41]["size"] = 17
defs["structs"]["ImGuiIO"][41]["name"] = "InputCharacters[16+1]"
defs["structs"]["ImGuiIO"][42] = {}
defs["structs"]["ImGuiIO"][42]["type"] = "float"
defs["structs"]["ImGuiIO"][42]["name"] = "NavInputs[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][42]["size"] = 21
defs["structs"]["ImGuiIO"][42]["name"] = "NavInputs[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][43] = {}
defs["structs"]["ImGuiIO"][43]["type"] = "bool"
defs["structs"]["ImGuiIO"][43]["name"] = "WantCaptureMouse"
@@ -1822,60 +1840,60 @@ defs["structs"]["ImGuiIO"][57]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][57]["name"] = "MousePosPrev"
defs["structs"]["ImGuiIO"][58] = {}
defs["structs"]["ImGuiIO"][58]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][58]["name"] = "MouseClickedPos[5]"
defs["structs"]["ImGuiIO"][58]["size"] = 5
defs["structs"]["ImGuiIO"][58]["name"] = "MouseClickedPos[5]"
defs["structs"]["ImGuiIO"][59] = {}
defs["structs"]["ImGuiIO"][59]["type"] = "double"
defs["structs"]["ImGuiIO"][59]["name"] = "MouseClickedTime[5]"
defs["structs"]["ImGuiIO"][59]["size"] = 5
defs["structs"]["ImGuiIO"][59]["name"] = "MouseClickedTime[5]"
defs["structs"]["ImGuiIO"][60] = {}
defs["structs"]["ImGuiIO"][60]["type"] = "bool"
defs["structs"]["ImGuiIO"][60]["name"] = "MouseClicked[5]"
defs["structs"]["ImGuiIO"][60]["size"] = 5
defs["structs"]["ImGuiIO"][60]["name"] = "MouseClicked[5]"
defs["structs"]["ImGuiIO"][61] = {}
defs["structs"]["ImGuiIO"][61]["type"] = "bool"
defs["structs"]["ImGuiIO"][61]["name"] = "MouseDoubleClicked[5]"
defs["structs"]["ImGuiIO"][61]["size"] = 5
defs["structs"]["ImGuiIO"][61]["name"] = "MouseDoubleClicked[5]"
defs["structs"]["ImGuiIO"][62] = {}
defs["structs"]["ImGuiIO"][62]["type"] = "bool"
defs["structs"]["ImGuiIO"][62]["name"] = "MouseReleased[5]"
defs["structs"]["ImGuiIO"][62]["size"] = 5
defs["structs"]["ImGuiIO"][62]["name"] = "MouseReleased[5]"
defs["structs"]["ImGuiIO"][63] = {}
defs["structs"]["ImGuiIO"][63]["type"] = "bool"
defs["structs"]["ImGuiIO"][63]["name"] = "MouseDownOwned[5]"
defs["structs"]["ImGuiIO"][63]["size"] = 5
defs["structs"]["ImGuiIO"][63]["name"] = "MouseDownOwned[5]"
defs["structs"]["ImGuiIO"][64] = {}
defs["structs"]["ImGuiIO"][64]["type"] = "float"
defs["structs"]["ImGuiIO"][64]["name"] = "MouseDownDuration[5]"
defs["structs"]["ImGuiIO"][64]["size"] = 5
defs["structs"]["ImGuiIO"][64]["name"] = "MouseDownDuration[5]"
defs["structs"]["ImGuiIO"][65] = {}
defs["structs"]["ImGuiIO"][65]["type"] = "float"
defs["structs"]["ImGuiIO"][65]["name"] = "MouseDownDurationPrev[5]"
defs["structs"]["ImGuiIO"][65]["size"] = 5
defs["structs"]["ImGuiIO"][65]["name"] = "MouseDownDurationPrev[5]"
defs["structs"]["ImGuiIO"][66] = {}
defs["structs"]["ImGuiIO"][66]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][66]["name"] = "MouseDragMaxDistanceAbs[5]"
defs["structs"]["ImGuiIO"][66]["size"] = 5
defs["structs"]["ImGuiIO"][66]["name"] = "MouseDragMaxDistanceAbs[5]"
defs["structs"]["ImGuiIO"][67] = {}
defs["structs"]["ImGuiIO"][67]["type"] = "float"
defs["structs"]["ImGuiIO"][67]["name"] = "MouseDragMaxDistanceSqr[5]"
defs["structs"]["ImGuiIO"][67]["size"] = 5
defs["structs"]["ImGuiIO"][67]["name"] = "MouseDragMaxDistanceSqr[5]"
defs["structs"]["ImGuiIO"][68] = {}
defs["structs"]["ImGuiIO"][68]["type"] = "float"
defs["structs"]["ImGuiIO"][68]["name"] = "KeysDownDuration[512]"
defs["structs"]["ImGuiIO"][68]["size"] = 512
defs["structs"]["ImGuiIO"][68]["name"] = "KeysDownDuration[512]"
defs["structs"]["ImGuiIO"][69] = {}
defs["structs"]["ImGuiIO"][69]["type"] = "float"
defs["structs"]["ImGuiIO"][69]["name"] = "KeysDownDurationPrev[512]"
defs["structs"]["ImGuiIO"][69]["size"] = 512
defs["structs"]["ImGuiIO"][69]["name"] = "KeysDownDurationPrev[512]"
defs["structs"]["ImGuiIO"][70] = {}
defs["structs"]["ImGuiIO"][70]["type"] = "float"
defs["structs"]["ImGuiIO"][70]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][70]["size"] = 21
defs["structs"]["ImGuiIO"][70]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][71] = {}
defs["structs"]["ImGuiIO"][71]["type"] = "float"
defs["structs"]["ImGuiIO"][71]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][71]["size"] = 21
defs["structs"]["ImGuiIO"][71]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiPayload"] = {}
defs["structs"]["ImGuiPayload"][1] = {}
defs["structs"]["ImGuiPayload"][1]["type"] = "void*"
@@ -1894,8 +1912,8 @@ defs["structs"]["ImGuiPayload"][5]["type"] = "int"
defs["structs"]["ImGuiPayload"][5]["name"] = "DataFrameCount"
defs["structs"]["ImGuiPayload"][6] = {}
defs["structs"]["ImGuiPayload"][6]["type"] = "char"
defs["structs"]["ImGuiPayload"][6]["name"] = "DataType[32+1]"
defs["structs"]["ImGuiPayload"][6]["size"] = 33
defs["structs"]["ImGuiPayload"][6]["name"] = "DataType[32+1]"
defs["structs"]["ImGuiPayload"][7] = {}
defs["structs"]["ImGuiPayload"][7]["type"] = "bool"
defs["structs"]["ImGuiPayload"][7]["name"] = "Preview"
@@ -1922,10 +1940,11 @@ defs["structs"]["ImGuiSizeCallbackData"][4]["name"] = "DesiredSize"
defs["structs"]["ImGuiTextFilter"] = {}
defs["structs"]["ImGuiTextFilter"][1] = {}
defs["structs"]["ImGuiTextFilter"][1]["type"] = "char"
defs["structs"]["ImGuiTextFilter"][1]["name"] = "InputBuf[256]"
defs["structs"]["ImGuiTextFilter"][1]["size"] = 256
defs["structs"]["ImGuiTextFilter"][1]["name"] = "InputBuf[256]"
defs["structs"]["ImGuiTextFilter"][2] = {}
defs["structs"]["ImGuiTextFilter"][2]["type"] = "ImVector/*<TextRange>*/"
defs["structs"]["ImGuiTextFilter"][2]["type"] = "ImVector"
defs["structs"]["ImGuiTextFilter"][2]["template_type"] = "TextRange"
defs["structs"]["ImGuiTextFilter"][2]["name"] = "Filters"
defs["structs"]["ImGuiTextFilter"][3] = {}
defs["structs"]["ImGuiTextFilter"][3]["type"] = "int"