From: John L. <jr...@us...> - 2005-11-24 03:38:13
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10852/wxLua/bindings Modified Files: genwxbind.lua Log Message: fix static class functions to work, but using %builtin Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** genwxbind.lua 20 Nov 2005 04:09:46 -0000 1.5 --- genwxbind.lua 24 Nov 2005 03:38:05 -0000 1.6 *************** *** 1,3 **** ! ---------------------------------------------------------------------------------- -- Name: genwxbind.lua -- Purpose: This script generates wrapper files from the table interfaceFileList (see below) --- 1,3 ---- ! ------------------------------------------------------------------------------- -- Name: genwxbind.lua -- Purpose: This script generates wrapper files from the table interfaceFileList (see below) *************** *** 6,20 **** -- Copyright: Ray Gilbert -- Licence: wxWindows licence ! ---------------------------------------------------------------------------------- -- code generated is compatible with wxWrapLua.lua, J Winwood's work from wxLua -- -- There were a few shortcomings of the code generated by wxWrapLua -- * it generated 1 huge header file, which caused some compilers to barf ! -- * it generated an different wrapper file for each version and platform of wxWidgets -- -- This generator creates ! -- * seperate c files for each interface file -- * each wrapper file uses c-preprocessor defines, and leaves it ! -- up to the compiler to add correct wrapper functions. This also haves -- the advantage of being able to distribute pre-generated wrapper interface files --- 6,20 ---- -- Copyright: Ray Gilbert -- Licence: wxWindows licence ! ------------------------------------------------------------------------------- -- code generated is compatible with wxWrapLua.lua, J Winwood's work from wxLua -- -- There were a few shortcomings of the code generated by wxWrapLua -- * it generated 1 huge header file, which caused some compilers to barf ! -- * it generated a different wrapper file for each version and platform of wxWidgets -- -- This generator creates ! -- * seperate cpp files for each interface file -- * each wrapper file uses c-preprocessor defines, and leaves it ! -- up to the compiler to add correct wrapper functions. This also has -- the advantage of being able to distribute pre-generated wrapper interface files *************** *** 92,127 **** function InitDataTypes() ! -- well known datatypes dataTypes["void"] = AllocDataType("void", "builtin", true) - dataTypes["int"] = AllocDataType("int", "builtin", true) - dataTypes["char"] = AllocDataType("char", "builtin", true) - dataTypes["long"] = AllocDataType("long", "builtin", true) dataTypes["bool"] = AllocDataType("bool", "builtin", true) dataTypes["BOOL"] = AllocDataType("BOOL", "builtin", true) dataTypes["short"] = AllocDataType("short", "builtin", true) ! dataTypes["size_t"] = AllocDataType("size_t", "builtin", true) ! dataTypes["unsigned int"] = AllocDataType("unsigned int", "builtin", true) dataTypes["unsigned char"] = AllocDataType("unsigned char", "builtin", true) dataTypes["unsigned long"] = AllocDataType("unsigned long", "builtin", true) dataTypes["unsigned short"] = AllocDataType("unsigned short", "builtin", true) dataTypes["wchar_t"] = AllocDataType("wchar_t", "builtin", true) - dataTypes["double"] = AllocDataType("double", "builtin", true) dataTypes["float"] = AllocDataType("float", "builtin", true) dataTypes["double"] = AllocDataType("double", "builtin", true) dataTypes["time_t"] = AllocDataType("time_t", "builtin", true) ! ! dataTypes["wxString"] = AllocDataType("wxString", "wx2lua", true) ! dataTypes["wxCoord"] = AllocDataType("wxCoord", "wxtypedef", true) dataTypes["wxDouble"] = AllocDataType("wxDouble", "wxtypedef", true) dataTypes["WXTYPE"] = AllocDataType("WXTYPE", "wxtypedef", true) dataTypes["wxWindowID"] = AllocDataType("wxWindowID", "wxtypedef", true) dataTypes["wxEventType"] = AllocDataType("wxEventType", "wxtypedef", true) dataTypes["wxSocketEventFlags"] = AllocDataType("wxSocketEventFlags", "wxtypedef", true) - dataTypes["wxUint32"] = AllocDataType("wxUint32", "wxtypedef", true) - dataTypes["wxInt32"] = AllocDataType("wxInt32", "wxtypedef", true) dataTypes["wxFileOffset"] = AllocDataType("wxFileOffset", "wxtypedef", true) - dataTypes["wxByte"] = AllocDataType("wxByte", "wxtypedef", true) - dataTypes["wxChar"] = AllocDataType("wxChar", "wxtypedef", true) dataTypes["wxStructStat"] = AllocDataType("wxStructStat", "wxtypedef", true) dataTypes["lua_State"] = AllocDataType("lua_State", "wxtypedef", false) -- win32 --- 92,136 ---- function InitDataTypes() ! -- Standard C data types dataTypes["void"] = AllocDataType("void", "builtin", true) dataTypes["bool"] = AllocDataType("bool", "builtin", true) dataTypes["BOOL"] = AllocDataType("BOOL", "builtin", true) dataTypes["short"] = AllocDataType("short", "builtin", true) ! dataTypes["int"] = AllocDataType("int", "builtin", true) ! dataTypes["char"] = AllocDataType("char", "builtin", true) ! dataTypes["long"] = AllocDataType("long", "builtin", true) dataTypes["unsigned char"] = AllocDataType("unsigned char", "builtin", true) + dataTypes["unsigned int"] = AllocDataType("unsigned int", "builtin", true) dataTypes["unsigned long"] = AllocDataType("unsigned long", "builtin", true) dataTypes["unsigned short"] = AllocDataType("unsigned short", "builtin", true) dataTypes["wchar_t"] = AllocDataType("wchar_t", "builtin", true) dataTypes["float"] = AllocDataType("float", "builtin", true) dataTypes["double"] = AllocDataType("double", "builtin", true) + dataTypes["size_t"] = AllocDataType("size_t", "builtin", true) dataTypes["time_t"] = AllocDataType("time_t", "builtin", true) ! -- wxWidgets defined data types ! dataTypes["wxByte"] = AllocDataType("wxByte", "wxtypedef", true) ! dataTypes["wxChar"] = AllocDataType("wxChar", "wxtypedef", true) ! dataTypes["wxWord"] = AllocDataType("wxWord", "wxtypedef", true) ! dataTypes["wxInt8"] = AllocDataType("wxInt8", "wxtypedef", true) ! dataTypes["wxUint8"] = AllocDataType("wxUint8", "wxtypedef", true) ! dataTypes["wxInt16"] = AllocDataType("wxInt16", "wxtypedef", true) ! dataTypes["wxUint16"] = AllocDataType("wxUint16", "wxtypedef", true) ! dataTypes["wxInt32"] = AllocDataType("wxInt32", "wxtypedef", true) ! dataTypes["wxUint32"] = AllocDataType("wxUint32", "wxtypedef", true) ! dataTypes["wxInt64"] = AllocDataType("wxInt64", "wxtypedef", true) ! dataTypes["wxUint64"] = AllocDataType("wxUint64", "wxtypedef", true) ! dataTypes["wxFloat32"] = AllocDataType("wxFloat32", "wxtypedef", true) ! dataTypes["wxFloat64"] = AllocDataType("wxFloat64", "wxtypedef", true) dataTypes["wxDouble"] = AllocDataType("wxDouble", "wxtypedef", true) + dataTypes["wxCoord"] = AllocDataType("wxCoord", "wxtypedef", true) + dataTypes["wxString"] = AllocDataType("wxString", "wx2lua", true) dataTypes["WXTYPE"] = AllocDataType("WXTYPE", "wxtypedef", true) dataTypes["wxWindowID"] = AllocDataType("wxWindowID", "wxtypedef", true) dataTypes["wxEventType"] = AllocDataType("wxEventType", "wxtypedef", true) dataTypes["wxSocketEventFlags"] = AllocDataType("wxSocketEventFlags", "wxtypedef", true) dataTypes["wxFileOffset"] = AllocDataType("wxFileOffset", "wxtypedef", true) dataTypes["wxStructStat"] = AllocDataType("wxStructStat", "wxtypedef", true) + -- lua data type dataTypes["lua_State"] = AllocDataType("lua_State", "wxtypedef", false) -- win32 *************** *** 134,144 **** dataTypes["LPDWORD"] = AllocDataType("LPDWORD", "builtin", true) ! -- dataTypes["cdPropertyItemList"] = AllocDataType("cdPropertyItemList", "wxtypedef", false) ! -- dataTypes["cdPropertyTemplateList"] = AllocDataType("cdPropertyTemplateList", "wxtypedef", false) ! -- dataTypes["cdPropertyMemberList"] = AllocDataType("cdPropertyMemberList", "wxtypedef", false) ! dataTypeAttribs["unsigned"] = true dataTypeAttribs["const"] = true - functionAttribs["static"] = true functionAttribs["virtual"] = true --- 143,149 ---- dataTypes["LPDWORD"] = AllocDataType("LPDWORD", "builtin", true) ! -- data type attributes that can precede a data type dataTypeAttribs["unsigned"] = true dataTypeAttribs["const"] = true functionAttribs["static"] = true functionAttribs["virtual"] = true *************** *** 165,169 **** local typeData = SplitString(typedefinition, { " ", "&", "*" }) ! for i=1, table.getn(typeData) do if dataTypes[typeData[i]] then return typeData[i] --- 170,174 ---- local typeData = SplitString(typedefinition, { " ", "&", "*" }) ! for i = 1, table.getn(typeData) do if dataTypes[typeData[i]] then return typeData[i] *************** *** 182,186 **** local typeData = SplitString(decl, { "[]", " ", "&", "*", "(", ")" }, { "[]", "&", "*", "(", ")" }) ! for i=1, table.getn(typeData) do if typeData[i] == "(" then cast = cast + 1 --- 187,191 ---- local typeData = SplitString(decl, { "[]", " ", "&", "*", "(", ")" }, { "[]", "&", "*", "(", ")" }) ! for i = 1, table.getn(typeData) do if typeData[i] == "(" then cast = cast + 1 *************** *** 190,194 **** if isDataTypeAttrib(typeData[i]) then attrib[typeData[i]] = typeData[i] ! elseif typeData[i] == "[]" or typeData[i] == "*" or typeData[i] == "&" then table.insert(ptr, typeData[i]) elseif dataTypes[typeData[i]] then --- 195,199 ---- if isDataTypeAttrib(typeData[i]) then attrib[typeData[i]] = typeData[i] ! elseif (typeData[i] == "[]") or (typeData[i] == "*") or (typeData[i] == "&") then table.insert(ptr, typeData[i]) elseif dataTypes[typeData[i]] then *************** *** 220,224 **** local datatype = nil for idx, attrib in attribs do ! if idx ~= nil and idx ~= "n" and attrib then if datatype then datatype = datatype.." "..attrib --- 225,229 ---- local datatype = nil for idx, attrib in attribs do ! if (idx ~= nil) and (idx ~= "n") and attrib then if datatype then datatype = datatype.." "..attrib *************** *** 261,265 **** local tlstype = nil for idx, attrib in attribs do ! if idx ~= nil and idx ~= "n" and attrib then if tlstype then tlstype = tlstype.." "..attrib --- 266,270 ---- local tlstype = nil for idx, attrib in attribs do ! if (idx ~= nil) and (idx ~= "n") and attrib then if tlstype then tlstype = tlstype.." "..attrib *************** *** 442,446 **** condition = conditionStack[1] else ! for i=1, conditionStackCount do if not condition then condition = "("..conditionStack[i]..")" --- 447,451 ---- condition = conditionStack[1] else ! for i = 1, conditionStackCount do if not condition then condition = "("..conditionStack[i]..")" *************** *** 478,497 **** conditions["%wxchkver26"] = "wxCHECK_VERSION(2,6,0)" conditions["%wxchkver27"] = "wxCHECK_VERSION(2,7,0)" conditions["%wxcompat20"] = "WXWIN_COMPATIBILITY_2" conditions["%wxcompat22"] = "WXWIN_COMPATIBILITY_2_2" conditions["%wxcompat24"] = "WXWIN_COMPATIBILITY_2_4" conditions["%wxcompat26"] = "WXWIN_COMPATIBILITY_2_6" ! -- wxWidgets platform checks ! conditions["%win"] = "defined(__WXMSW__)" ! conditions["%msw"] = "defined(__WXMSW__)" ! conditions["%gtk"] = "defined(__WXGTK__)" ! conditions["%mac"] = "defined(__WXMAC__)" ! conditions["%mgl"] = "defined(__WXMGL__)" ! conditions["%motif"] = "defined(__WXMOTIF__)" ! conditions["%univ"] = "defined(__WXMSW__)" ! conditions["%x11"] = "defined(__WXX11__)" ! conditions["%cocoa"] = "defined(__WXCOCOA__)" ! conditions["%os2"] = "defined(__WXPM__)" -- wxUSE_ conditions --- 483,506 ---- conditions["%wxchkver26"] = "wxCHECK_VERSION(2,6,0)" conditions["%wxchkver27"] = "wxCHECK_VERSION(2,7,0)" + conditions["%wxchkver28"] = "wxCHECK_VERSION(2,8,0)" + -- wxWidgets version compatibility checks conditions["%wxcompat20"] = "WXWIN_COMPATIBILITY_2" conditions["%wxcompat22"] = "WXWIN_COMPATIBILITY_2_2" conditions["%wxcompat24"] = "WXWIN_COMPATIBILITY_2_4" conditions["%wxcompat26"] = "WXWIN_COMPATIBILITY_2_6" ! conditions["%wxcompat28"] = "WXWIN_COMPATIBILITY_2_8" -- wxWidgets platform checks ! conditions["%win"] = "defined(__WXMSW__)" ! conditions["%msw"] = "defined(__WXMSW__)" ! conditions["%gtk"] = "defined(__WXGTK__)" ! conditions["%mac"] = "defined(__WXMAC__)" ! conditions["%mgl"] = "defined(__WXMGL__)" ! conditions["%motif"] = "defined(__WXMOTIF__)" ! conditions["%univ"] = "defined(__WXUNIVERSAL__)" ! conditions["%x11"] = "defined(__WXX11__)" ! conditions["%cocoa"] = "defined(__WXCOCOA__)" ! conditions["%os2"] = "defined(__WXPM__)" ! conditions["%palm"] = "defined(__WXPALMOS__)" ! conditions["%wince"] = "defined(__WXWINCE__)" -- wxUSE_ conditions *************** *** 673,677 **** conditions["wxUSE_ZLIB"] = "wxUSE_ZLIB" ! -- wxLUA_USE_ conditions conditions["wxLUA_USE_CODEDRAGON"] = "wxLUA_USE_CODEDRAGON" conditions["wxLUA_USE_FL"] = "wxLUA_USE_FL" --- 682,686 ---- conditions["wxUSE_ZLIB"] = "wxUSE_ZLIB" ! -- wxLUA_USE_ conditions conditions["wxLUA_USE_CODEDRAGON"] = "wxLUA_USE_CODEDRAGON" conditions["wxLUA_USE_FL"] = "wxLUA_USE_FL" *************** *** 785,789 **** conditions["wxLUA_USE_wxXMLResource"] = "wxLUA_USE_wxXMLResource" - -- operators conditionOperators["|"] = "||" --- 794,797 ---- *************** *** 829,835 **** end ! -- Split string ! -- ! -- String tokenizing function -- -- Params: --- 837,841 ---- end ! -- SplitString - String tokenizing function -- -- Params: *************** *** 867,873 **** end else ! if string.sub(val, 1, 1) == "\"" then ! inStringLiteral = true ! end end end --- 873,879 ---- end else ! if string.sub(val, 1, 1) == "\"" then ! inStringLiteral = true ! end end end *************** *** 875,879 **** if not inStringLiteral then -- delimiter can be an table of strings ! for d=1, table.getn(delimiter) do if string.sub(val, 1, string.len(delimiter[d])) == delimiter[d] then delim = delimiter[d] --- 881,885 ---- if not inStringLiteral then -- delimiter can be an table of strings ! for d = 1, table.getn(delimiter) do if string.sub(val, 1, string.len(delimiter[d])) == delimiter[d] then delim = delimiter[d] *************** *** 884,888 **** -- keep delimiter in list if delim and keep then ! for d=1, table.getn(keep) do if delim == keep[d] then keepDelim = true --- 890,894 ---- -- keep delimiter in list if delim and keep then ! for d = 1, table.getn(keep) do if delim == keep[d] then keepDelim = true *************** *** 1038,1042 **** if filename then local interfaceFileData = readInterfaceFile(filename) - BuildDataTypeTable(interfaceFileData) --- 1044,1047 ---- *************** *** 1070,1074 **** function writeWrapperFiles(interfaceList) ! -- generatelanguage binding, binding is store in objectList for idx = 1, table.getn(interfaceList) do local interface = interfaceList[idx] --- 1075,1079 ---- function writeWrapperFiles(interfaceList) ! -- generatelanguage binding, binding is stored in objectList for idx = 1, table.getn(interfaceList) do local interface = interfaceList[idx] *************** *** 1182,1186 **** local lineCount = table.getn(interfaceData) ! for l=1, lineCount do -- get lineData local line = interfaceData[l] --- 1187,1191 ---- local lineCount = table.getn(interfaceData) ! for l = 1, lineCount do -- get lineData local line = interfaceData[l] *************** *** 1195,1199 **** local tagCount = table.getn(lineTags) ! for t=1, tagCount do local tag = lineTags[t] --- 1200,1204 ---- local tagCount = table.getn(lineTags) ! for t = 1, tagCount do local tag = lineTags[t] *************** *** 1286,1290 **** local lineCount = table.getn(interfaceData) ! for l=1, lineCount do -- get lineData local line = interfaceData[l] --- 1291,1295 ---- local lineCount = table.getn(interfaceData) ! for l = 1, lineCount do -- get lineData local line = interfaceData[l] *************** *** 1326,1330 **** local tagCount = table.getn(lineTags) ! for t=1, tagCount do local tag = lineTags[t] --- 1331,1335 ---- local tagCount = table.getn(lineTags) ! for t = 1, tagCount do local tag = lineTags[t] *************** *** 1555,1559 **** end elseif not parseState.IsBlockComment then ! if tag == "!" or (lineState.DefType == "blockcondition" or lineState.InLineConditionIf) and conditionOperators[tag] then if not lineState.Condition and (conditionOperators[tag] ~= "!") then print("Error: Unexpected Conditional Operator "..tag..". File: "..line.File..":(line "..line.LineNumber..")\n") --- 1560,1564 ---- end elseif not parseState.IsBlockComment then ! if (tag == "!") or ((lineState.DefType == "blockcondition") or lineState.InLineConditionIf) and conditionOperators[tag] then if not lineState.Condition and (conditionOperators[tag] ~= "!") then print("Error: Unexpected Conditional Operator "..tag..". File: "..line.File..":(line "..line.LineNumber..")\n") *************** *** 1661,1665 **** lineState.DefType = "method" lineState.Action = "method" - lineState.ActionMandatory = true --- 1666,1669 ---- *************** *** 1673,1693 **** lineState.DefType = "method" lineState.Action = "method" - lineState.ActionMandatory = true elseif tag == "virtual" then lineState.IsVirtualFunction = true - lineState.DefType = "method" lineState.Action = "method" - lineState.ActionMandatory = true elseif tag == "static" then lineState.IsStaticFunction = true - lineState.DefType = "method" lineState.Action = "method" - lineState.ActionMandatory = true --- 1677,1692 ---- *************** *** 1697,1701 **** lineState.DataType = parseState.ObjectStack[1].Name lineState.DataTypeWithAttrib = lineState.DataType - lineState.DefType = "method" lineState.Action = "method" --- 1696,1699 ---- *************** *** 1732,1738 **** parseState.ObjectStack[1].Name = tag - lineState.DataType = tag enumType = tag ! lineState.Action = nil lineState.ActionMandatory = false --- 1730,1735 ---- parseState.ObjectStack[1].Name = tag enumType = tag ! lineState.DataType = tag lineState.Action = nil lineState.ActionMandatory = false *************** *** 1803,1809 **** lineState.Name = tag - --local member = AllocMember(lineState) - --table.insert(parseState.ObjectStack[1].Members, member) - lineState.Action = nil lineState.ActionMandatory = false --- 1800,1803 ---- *************** *** 1836,1840 **** lineState.ActionMandatory = true ! elseif tag == "*" or tag == "&" or tag == "[]" then table.insert(lineState.DataTypePointer, tag) --- 1830,1834 ---- lineState.ActionMandatory = true ! elseif (tag == "*") or (tag == "&") or (tag == "[]") then table.insert(lineState.DataTypePointer, tag) *************** *** 1851,1860 **** end - -- local member= AllocMember(lineState) - -- table.insert(parseState.ObjectStack[1].Members, member) - lineState.Action = nil lineState.ActionMandatory = false - end --- 1845,1850 ---- *************** *** 1886,1890 **** lineState.ActionMandatory = true ! elseif tag == "*" or tag == "&" then table.insert(lineState.DataTypePointer, tag) --- 1876,1880 ---- lineState.ActionMandatory = true ! elseif (tag == "*") or (tag == "&") then table.insert(lineState.DataTypePointer, tag) *************** *** 1944,1950 **** end - -- local member= AllocMember(lineState) - -- table.insert(parseState.ObjectStack[1].Members, member) - lineState.Action = "methodbracket" lineState.ActionMandatory = true --- 1934,1937 ---- *************** *** 2237,2241 **** end ! -- pop builtin (globals) parseObject table.insert(objectList, 1, parseState.ObjectStack[1]) table.remove(parseState.ObjectStack, 1) --- 2224,2228 ---- end ! -- pop builtin (globals) parseObject that was put in first table.insert(objectList, 1, parseState.ObjectStack[1]) table.remove(parseState.ObjectStack, 1) *************** *** 2243,2247 **** if table.getn(parseState.ObjectStack) ~= 0 then print("parseState.ObjectStack should be empty, has "..table.getn(parseState.ObjectStack).." items left.") ! DumpTable(parseState.ObjectStack) end --- 2230,2234 ---- if table.getn(parseState.ObjectStack) ~= 0 then print("parseState.ObjectStack should be empty, has "..table.getn(parseState.ObjectStack).." items left.") ! DumpTable(parseState.ObjectStack, "parseState.ObjectStack") end *************** *** 2253,2257 **** local var = split[1] ! for i=2, table.getn(split) do var = var.."_"..split[i] end --- 2240,2244 ---- local var = split[1] ! for i = 2, table.getn(split) do var = var.."_"..split[i] end *************** *** 2285,2292 **** local parseObjectCount = table.getn(interface.objectData) ! for o=1, parseObjectCount do local parseObject = interface.objectData[o] ! -- ////////////////////////////////////////////////////////////////////////////////// -- de-duplicates include references if parseObject.DefType == "include" then --- 2272,2279 ---- local parseObjectCount = table.getn(interface.objectData) ! for o = 1, parseObjectCount do local parseObject = interface.objectData[o] ! -- /////////////////////////////////////////////////////////////////// -- de-duplicates include references if parseObject.DefType == "include" then *************** *** 2314,2321 **** end ! for o=1, parseObjectCount do local parseObject = interface.objectData[o] ! -- ////////////////////////////////////////////////////////////////////////////////// -- encapsulate non-wxObject objects with a tracked wxObject if parseObject.Encapsulate then --- 2301,2308 ---- end ! for o = 1, parseObjectCount do local parseObject = interface.objectData[o] ! -- /////////////////////////////////////////////////////////////////// -- encapsulate non-wxObject objects with a tracked wxObject if parseObject.Encapsulate then *************** *** 2336,2345 **** -- parseObject member binding local memberCount = table.getn(parseObject.Members) ! for m=1, memberCount do local member = parseObject.Members[m] local fullcondition = AddCondition(member.Condition, member.ExtraCondition) ! -- ////////////////////////////////////////////////////////////////////////////////// -- property binding if member.DefType == "property" then --- 2323,2332 ---- -- parseObject member binding local memberCount = table.getn(parseObject.Members) ! for m = 1, memberCount do local member = parseObject.Members[m] local fullcondition = AddCondition(member.Condition, member.ExtraCondition) ! -- /////////////////////////////////////////////////////////////// -- property binding if member.DefType == "property" then *************** *** 3016,3019 **** --- 3003,3007 ---- table.insert(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") end + table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") *************** *** 3460,3464 **** table.insert(fileData, "\n\n") ! table.insert(fileData, "// binds "..hook_namespace.." to cdlua\n") table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L);\n") table.insert(fileData, "\n\n") --- 3448,3452 ---- table.insert(fileData, "\n\n") ! table.insert(fileData, "// binds "..hook_namespace.." to wxLua\n") table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L);\n") table.insert(fileData, "\n\n") *************** *** 3471,3481 **** ! -- /////////////////////////////////////////////////////////////////////////////////////////////////// -- -- Object Include List -- ! -- ///////////////////////////////////////////////////////////////////////////////////////////////// for condition, classIncludeBindingList in classIncludeBindingTable do ! if condition ~= nil and condition ~= "n" and condition ~= "" and classIncludeBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") --- 3459,3469 ---- ! -- /////////////////////////////////////////////////////////////////////// -- -- Object Include List -- ! -- /////////////////////////////////////////////////////////////////////// for condition, classIncludeBindingList in classIncludeBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and classIncludeBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") *************** *** 3494,3505 **** table.insert(fileData, "\n") ! -- /////////////////////////////////////////////////////////////////////////////////////////////////// -- -- Class Tag Declaration -- ! -- ///////////////////////////////////////////////////////////////////////////////////////////////// table.insert(fileData, "// Lua Tag Method Values for each Class\n") for condition, classTagBindingList in classTagBindingTable do ! if condition ~= nil and condition ~= "n" and condition ~= "" and classTagBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") --- 3482,3493 ---- table.insert(fileData, "\n") ! -- /////////////////////////////////////////////////////////////////////// -- -- Class Tag Declaration -- ! -- /////////////////////////////////////////////////////////////////////// table.insert(fileData, "// Lua Tag Method Values for each Class\n") for condition, classTagBindingList in classTagBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and classTagBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") *************** *** 3518,3529 **** table.insert(fileData, "\n\n") ! -- /////////////////////////////////////////////////////////////////////////////////////////////////// -- -- Class Method Table Declaration -- ! -- ///////////////////////////////////////////////////////////////////////////////////////////////// table.insert(fileData, "// Method Table\n") for condition, classTagBindingList in classTagBindingTable do ! if condition ~= nil and condition ~= "n" and condition ~= "" and classTagBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") --- 3506,3517 ---- table.insert(fileData, "\n\n") ! -- /////////////////////////////////////////////////////////////////////// -- -- Class Method Table Declaration -- ! -- /////////////////////////////////////////////////////////////////////// table.insert(fileData, "// Method Table\n") for condition, classTagBindingList in classTagBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and classTagBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") *************** *** 3549,3553 **** -- ///////////////////////////////////////////////////////////////////////////////////////////////// for condition, encapsulationBindingList in encapsulationBindingTable do ! if condition ~= nil and condition ~= "n" and condition ~= "" and encapsulationBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") --- 3537,3541 ---- -- ///////////////////////////////////////////////////////////////////////////////////////////////// for condition, encapsulationBindingList in encapsulationBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and encapsulationBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") *************** *** 3567,3571 **** table.insert(fileData, "\n\n") - table.insert(fileData, "#endif // __HOOK_WXLUA_"..hook_namespace.."_H__\n\n") --- 3555,3558 ---- *************** *** 3841,3847 **** end ! -------------------------------------------------------------------------- -- Write GetObjectList Hook File ! -------------------------------------------------------------------------- function generateHookObjectFileTable() local fileData = {} --- 3828,3834 ---- end ! ------------------------------------------------------------------------------ -- Write GetObjectList Hook File ! ------------------------------------------------------------------------------ function generateHookObjectFileTable() local fileData = {} *************** *** 3879,3887 **** table.insert(fileData, "\n") ! -- /////////////////////////////////////////////////////////////////////////////////////////////////// -- -- GetObjectList -- ! -- ///////////////////////////////////////////////////////////////////////////////////////////////// table.insert(fileData, "WXLUAOBJECT* "..hook_object_fn.."(size_t &count)\n{\n") table.insert(fileData, " static WXLUAOBJECT objectList[] =\n {\n") --- 3866,3874 ---- table.insert(fileData, "\n") ! -- /////////////////////////////////////////////////////////////////////// -- -- GetObjectList -- ! -- /////////////////////////////////////////////////////////////////////// table.insert(fileData, "WXLUAOBJECT* "..hook_object_fn.."(size_t &count)\n{\n") table.insert(fileData, " static WXLUAOBJECT objectList[] =\n {\n") *************** *** 3928,3934 **** end ! -------------------------------------------------------------------------- -- Write GetEventList Hook File ! -------------------------------------------------------------------------- function generateHookEventFileTable() local fileData = {} --- 3915,3921 ---- end ! ------------------------------------------------------------------------------ -- Write GetEventList Hook File ! ------------------------------------------------------------------------------ function generateHookEventFileTable() local fileData = {} *************** *** 3965,3973 **** table.insert(fileData, "\n\n") ! -- /////////////////////////////////////////////////////////////////////////////////////////////////// -- -- GetEventList -- ! -- ///////////////////////////////////////////////////////////////////////////////////////////////// table.insert(fileData, "WXLUAEVENT* "..hook_event_fn.."(size_t &count)\n{\n") table.insert(fileData, " static WXLUAEVENT eventList[] =\n {\n") --- 3952,3960 ---- table.insert(fileData, "\n\n") ! -- /////////////////////////////////////////////////////////////////////// -- -- GetEventList -- ! -- /////////////////////////////////////////////////////////////////////// table.insert(fileData, "WXLUAEVENT* "..hook_event_fn.."(size_t &count)\n{\n") table.insert(fileData, " static WXLUAEVENT eventList[] =\n {\n") *************** *** 3998,4004 **** end ! -------------------------------------------------------------------------- -- Write GetBuiltinList Hook File ! -------------------------------------------------------------------------- function generateHookBuiltinFileTable() local fileData = {} --- 3985,3991 ---- end ! ------------------------------------------------------------------------------ -- Write GetBuiltinList Hook File ! ------------------------------------------------------------------------------ function generateHookBuiltinFileTable() local fileData = {} *************** *** 4064,4072 **** end ! -- /////////////////////////////////////////////////////////////////////////////////////////////////// -- -- GetBuiltinList -- ! -- ///////////////////////////////////////////////////////////////////////////////////////////////// table.insert(fileData, "WXLUAMETHOD* "..hook_builtin_fn.."(size_t &count)\n{\n") table.insert(fileData, " static WXLUAMETHOD builtinList[] =\n {\n") --- 4051,4059 ---- end ! -- /////////////////////////////////////////////////////////////////////// -- -- GetBuiltinList -- ! -- /////////////////////////////////////////////////////////////////////// table.insert(fileData, "WXLUAMETHOD* "..hook_builtin_fn.."(size_t &count)\n{\n") table.insert(fileData, " static WXLUAMETHOD builtinList[] =\n {\n") *************** *** 4393,4397 **** InitKeywords() ! -- BuildConditionsTable(); InitDataTypes() --- 4380,4384 ---- InitKeywords() ! -- BuildConditionsTable() InitDataTypes() |