From: John L. <jr...@us...> - 2006-05-17 22:47:19
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27493/wxLua/bindings Modified Files: genwxbind.lua Log Message: change enum wxClass::XXX to be accessed as wxClass_XXX added %staticonly keyword for classes that only have static members Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** genwxbind.lua 16 May 2006 22:47:08 -0000 1.62 --- genwxbind.lua 17 May 2006 22:47:09 -0000 1.63 *************** *** 213,216 **** --- 213,218 ---- -- "fake" data types that we handle in some more complicated way dataTypes["wxArrayString_FromLuaTable"] = AllocDataType("wxArrayString_FromLuaTable", "wxtypedef", true) + dataTypes["wxArrayInt_FromLuaTable"] = AllocDataType("wxArrayInt_FromLuaTable", "wxtypedef", true) + dataTypes["LuaTable"] = AllocDataType("LuaTable", "wxtypedef", true) -- data type attributes that can precede a data type *************** *** 993,996 **** --- 995,999 ---- keywords["%constructor"] = true keywords["%static"] = true + keywords["%staticonly"] = true keywords["%member"] = true keywords["%operator"] = true *************** *** 1753,1757 **** -- ClassName::MemberFunction(...) lineState.IsStaticFunction = true ! lineState.CreateStaticFunction = true lineState.DefType = "method" lineState.Action = "method" --- 1756,1769 ---- -- ClassName::MemberFunction(...) lineState.IsStaticFunction = true ! lineState.CreateStaticFunction = 1 ! lineState.DefType = "method" ! lineState.Action = "method" ! lineState.ActionMandatory = true ! ! elseif tag == "%staticonly" then ! -- means that we will ONLY create function ClassName_MemberFunction(...) ! -- as opposed to "%static" where we also generate member function ! lineState.IsStaticFunction = true ! lineState.CreateStaticFunction = 2 lineState.DefType = "method" lineState.Action = "method" *************** *** 2451,2455 **** elseif lineState.DefType == "method" then ! table.insert(parseState.ObjectStack[1].Members, AllocMember(lineState, GetCondition(parseState.ConditionStack))) if lineState.CreateStaticFunction then --- 2463,2470 ---- elseif lineState.DefType == "method" then ! -- add member if not %staticonly ! if lineState.CreateStaticFunction ~= 2 then ! table.insert(parseState.ObjectStack[1].Members, AllocMember(lineState, GetCondition(parseState.ConditionStack))) ! end if lineState.CreateStaticFunction then *************** *** 2865,2869 **** if pos then namespace = string.sub(dataType, 0, pos - 1) ! -- luaname = namespace.."_"..luaname -- FIXME unrem this to put enums as wxFile::read -> wxFile_read namespace = namespace.."::" end --- 2880,2884 ---- if pos then namespace = string.sub(dataType, 0, pos - 1) ! luaname = namespace.."_"..luaname -- wxFile::read -> wxFile_read namespace = namespace.."::" end *************** *** 3104,3108 **** end ! if (indirectionCount == 1) and (argPtr == "[]") then argTypeWithAttrib = argTypeWithAttrib.." *" --- 3119,3138 ---- end ! -- our special notation to get wxStringArray from a lua table of strings ! if argType == "wxArrayString_FromLuaTable" then ! overload_argList = overload_argList.."&s_wxluaarg_LuaTable, " ! argItem = "wxArrayString(); wxlState.GetwxArrayString("..argNum..", "..argName..")" ! declare = "wxArrayString " ! elseif argType == "wxArrayInt_FromLuaTable" then ! overload_argList = overload_argList.."&s_wxluaarg_LuaTable, " ! argItem = "wxArrayInt(); wxlState.GetwxArrayInt("..argNum..", "..argName..")" ! declare = "wxArrayInt " ! elseif argType == "LuaTable" then ! -- THIS MUST BE AN OVERLOAD AND HANDLED THERE, we just set overload_argList ! -- the code genererated here is nonsense ! overload_argList = overload_argList.."&s_wxluaarg_LuaTable, " ! argItem = "YOU MUST OVERLOAD THIS FUNCTION " ! declare = "YOU MUST OVERLOAD THIS FUNCTION " ! elseif (indirectionCount == 1) and (argPtr == "[]") then argTypeWithAttrib = argTypeWithAttrib.." *" *************** *** 3187,3194 **** end end - -- our special notation to get wxStringArray from a lua table of strings - elseif argType == "wxArrayString_FromLuaTable" then - argItem = "wxArrayString(); dummy_count = wxlState.GetwxArrayString("..argNum..", "..argName..")" - declare = "int dummy_count; wxArrayString " else argTypeWithAttrib = argTypeWithAttrib.." *" --- 3217,3220 ---- |