From: John L. <jr...@us...> - 2006-05-24 04:53:55
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6138/wxLua/modules/wxluasocket/src Added Files: wxluasocket.cpp wxluasocket_bind.cpp Log Message: added wxluasocket bindings to go into modules/wxluasocket instead of wxwidgets bindings --- NEW FILE: wxluasocket_bind.cpp --- // ---------------------------------------------------------------------------- // This file was generated by genwxbind.lua // // Any changes made to this file may be lost when file is regenerated. // ---------------------------------------------------------------------------- #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlstate.h" #include "wxluasocket/include/wxluasocket_bind.h" #include "wx/wxprec.h" // ---------------------------------------------------------------------------- // wxLuaGetEventList_wxluasocket() is called to register events // ---------------------------------------------------------------------------- WXLUAEVENT* wxLuaGetEventList_wxluasocket(size_t &count) { static WXLUAEVENT eventList[] = { { &wxEVT_WXLUA_DEBUG_BREAK, "wxEVT_WXLUA_DEBUG_BREAK", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_CLIENT_CONNECTED, "wxEVT_WXLUA_DEBUG_CLIENT_CONNECTED", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_ERROR, "wxEVT_WXLUA_DEBUG_ERROR", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_EVALUATE_EXPR, "wxEVT_WXLUA_DEBUG_EVALUATE_EXPR", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_EXIT, "wxEVT_WXLUA_DEBUG_EXIT", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_PRINT, "wxEVT_WXLUA_DEBUG_PRINT", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM, "wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_STACK_ENUM, "wxEVT_WXLUA_DEBUG_STACK_ENUM", &s_wxluatag_wxLuaDebugEvent }, { &wxEVT_WXLUA_DEBUG_TABLE_ENUM, "wxEVT_WXLUA_DEBUG_TABLE_ENUM", &s_wxluatag_wxLuaDebugEvent }, { 0, 0, 0 }, }; count = (sizeof(eventList)/sizeof(eventList[0])) - 1; return eventList; } // ---------------------------------------------------------------------------- // wxLuaGetDefineList_wxluasocket() is called to register defines and enums // ---------------------------------------------------------------------------- WXLUADEFINE* wxLuaGetDefineList_wxluasocket(size_t &count) { static WXLUADEFINE defineList[] = { // -------------------------------------------------------------------- // %define // -------------------------------------------------------------------- // -------------------------------------------------------------------- // %enum // -------------------------------------------------------------------- { 0, 0 }, }; count = (sizeof(defineList)/sizeof(defineList[0])) - 1; return defineList; } // ---------------------------------------------------------------------------- // wxLuaGetStringList_wxluasocket() is called to register strings // ---------------------------------------------------------------------------- WXLUASTRING* wxLuaGetStringList_wxluasocket(size_t &count) { static WXLUASTRING stringList[] = { // -------------------------------------------------------------------- // %define %string // -------------------------------------------------------------------- { 0, 0 }, }; count = (sizeof(stringList)/sizeof(stringList[0])) - 1; return stringList; } // ---------------------------------------------------------------------------- // wxLuaGetObjectList_wxluasocket() is called to register object and pointer bindings // ---------------------------------------------------------------------------- WXLUAOBJECT* wxLuaGetObjectList_wxluasocket(size_t &count) { static WXLUAOBJECT objectList[] = { { 0, 0, 0, 0 }, }; count = (sizeof(objectList)/sizeof(objectList[0])) - 1; return objectList; } // ---------------------------------------------------------------------------- // wxLuaGetFunctionList_wxluasocket() is called to register global functions // ---------------------------------------------------------------------------- WXLUAMETHOD* wxLuaGetFunctionList_wxluasocket(size_t &count) { static WXLUAMETHOD functionList[] = { { LuaGlobal, 0, 0, 0, 0, {0} }, }; count = (sizeof(functionList)/sizeof(functionList[0])) - 1; return functionList; } WXLUACLASS* wxLuaGetClassList_wxluasocket(size_t &count) { static WXLUACLASS classList[] = { { "wxLuaDebugData", wxLuaDebugData_methods, wxLuaDebugData_methodCount, -1, NULL, &s_wxluatag_wxLuaDebugData, NULL }, { "wxLuaDebugEvent", wxLuaDebugEvent_methods, wxLuaDebugEvent_methodCount, -1, CLASSINFO(wxLuaDebugEvent), &s_wxluatag_wxLuaDebugEvent, "wxEvent" }, { "wxLuaDebugServer", wxLuaDebugServer_methods, wxLuaDebugServer_methodCount, -1, NULL, &s_wxluatag_wxLuaDebugServer, NULL }, { 0, 0, 0, 0, 0, 0, 0 }, }; count = (sizeof(classList)/sizeof(classList[0])) - 1; return classList; } // ---------------------------------------------------------------------------- // wxLuaGetClassList_wxluasocket() is called to register classes // ---------------------------------------------------------------------------- // binding class extern WXLUACLASS *wxLuaGetClassList_wxluasocket(size_t &count); extern WXLUADEFINE *wxLuaGetDefineList_wxluasocket(size_t &count); extern WXLUASTRING *wxLuaGetStringList_wxluasocket(size_t &count); extern WXLUAEVENT *wxLuaGetEventList_wxluasocket(size_t &count); extern WXLUAOBJECT *wxLuaGetObjectList_wxluasocket(size_t &count); extern WXLUAMETHOD *wxLuaGetFunctionList_wxluasocket(size_t &count); IMPLEMENT_DYNAMIC_CLASS(wxLuaBinding_wxluasocket, wxLuaBinding) wxLuaBinding_wxluasocket::wxLuaBinding_wxluasocket() : wxLuaBinding() { m_nameSpace = wxT("wx"); pfGetClassList = wxLuaGetClassList_wxluasocket; pfGetDefineList = wxLuaGetDefineList_wxluasocket; pfGetStringList = wxLuaGetStringList_wxluasocket; pfGetEventList = wxLuaGetEventList_wxluasocket; pfGetObjectList = wxLuaGetObjectList_wxluasocket; pfGetBuiltinList = wxLuaGetFunctionList_wxluasocket; Initialize(); } void wxLuaBinding_wxluasocket::PreRegister(const wxLuaState& , bool , int ) { } void wxLuaBinding_wxluasocket::PostRegister(const wxLuaState& , bool , int ) { } // bind wxLuaBinding_wxluasocket to a single wxLuaState extern bool wxLuaBinding_wxluasocket_bind(const wxLuaState& wxlState); // initialize wxLuaBinding_wxluasocket for all wxLuaStates extern bool wxLuaBinding_wxluasocket_init(); // bind wxLuaBinding_wxluasocket to a single wxLuaState bool wxLuaBinding_wxluasocket_bind(const wxLuaState& wxlState_) { wxLuaState wxlState(wxlState_); wxCHECK_MSG(wxlState.Ok(), false, wxT("Invalid wxLuaState")); wxASSERT(!wxlState.GetLuaStateData()->m_typesRegistered); wxASSERT(!wxlState.GetLuaBinding(wxT("wxluasocket"))); // ignore binding request when we already have wxluasocket registered if (wxlState.GetLuaBinding(wxT("wxluasocket"))) return false; wxlState.GetLuaStateData()->m_bindings.Append(new wxLuaBinding_wxluasocket()); return true; } // initialize wxLuaBinding_wxluasocket for all wxLuaStates bool wxLuaBinding_wxluasocket_init() { static wxLuaBinding_wxluasocket m_binding; wxLuaBindingList::Node *node = wxLuaBinding::GetBindingList()->Find(&m_binding); if (node && (node->GetData() == &m_binding)) return false; wxLuaBinding::GetBindingList()->Append(&m_binding); return true; } --- NEW FILE: wxluasocket.cpp --- // ---------------------------------------------------------------------------- // This file was generated by genwxbind.lua // // Any changes made to this file may be lost when file is regenerated. // ---------------------------------------------------------------------------- #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlstate.h" #include "wxluasocket/include/wxluasocket_bind.h" #include "wx/wxprec.h" // ------------------------------------------------------------------------------------------------- // Bind class wxLuaDebugServer // ------------------------------------------------------------------------------------------------- // Lua MetaTable Tag for Class int s_wxluatag_wxLuaDebugServer = -1; // wxLuaDebugServer(int portNumber) static int LUACALL wxLua_wxLuaDebugServer_constructor(lua_State *L) { wxLuaState wxlState(L); wxLuaDebugServer *returns; // int portNumber int portNumber = (int)wxlState.GetNumberType(1); // call constructor returns = new wxLuaDebugServer(portNumber); // add to tracked memory list wxLua_AddToTrackedMemoryList(wxlState, (wxLuaDebugServer *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaDebugServer, returns); return 1; } // %override wxLua_wxLuaDebugServerCompile_constructor // %constructor wxLuaDebugServerCompile(const wxString &buffer, const wxString &fileName) static int LUACALL wxLua_wxLuaDebugServerCompile_constructor(lua_State *L) { wxLuaState wxlState(L); // const wxString &fileName wxString fileName = lua2wx(wxlState.GetStringType(2)); // const wxString &buffer wxString buffer = lua2wx(wxlState.GetStringType(1)); // compile the file bool fResult = wxLuaDebugServer::Compile(buffer, fileName); // push result lua_pushboolean(L, fResult); // return the number of parameters return 1; } // bool StartClient() static int LUACALL wxLua_wxLuaDebugServer_StartClient(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StartClient returns = self->StartClient(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool StartServerThread() static int LUACALL wxLua_wxLuaDebugServer_StartServerThread(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StartServerThread returns = self->StartServerThread(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool AddBreakPoint(const wxString &fileName, int lineNumber) static int LUACALL wxLua_wxLuaDebugServer_AddBreakPoint(lua_State *L) { wxLuaState wxlState(L); bool returns; // int lineNumber int lineNumber = (int)wxlState.GetNumberType(3); // const wxString fileName const wxString fileName = lua2wx(wxlState.GetStringType(2)); // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call AddBreakPoint returns = self->AddBreakPoint(fileName, lineNumber); // push the result flag lua_pushboolean(L, returns); return 1; } // bool RemoveBreakPoint(const wxString &fileName, int lineNumber) static int LUACALL wxLua_wxLuaDebugServer_RemoveBreakPoint(lua_State *L) { wxLuaState wxlState(L); bool returns; // int lineNumber int lineNumber = (int)wxlState.GetNumberType(3); // const wxString fileName const wxString fileName = lua2wx(wxlState.GetStringType(2)); // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call RemoveBreakPoint returns = self->RemoveBreakPoint(fileName, lineNumber); // push the result flag lua_pushboolean(L, returns); return 1; } // bool ClearAllBreakPoints() static int LUACALL wxLua_wxLuaDebugServer_ClearAllBreakPoints(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call ClearAllBreakPoints returns = self->ClearAllBreakPoints(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool Run(const wxString &file, const wxString &fileName) static int LUACALL wxLua_wxLuaDebugServer_Run(lua_State *L) { wxLuaState wxlState(L); bool returns; // const wxString fileName const wxString fileName = lua2wx(wxlState.GetStringType(3)); // const wxString file const wxString file = lua2wx(wxlState.GetStringType(2)); // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Run returns = self->Run(file, fileName); // push the result flag lua_pushboolean(L, returns); return 1; } // bool Step() static int LUACALL wxLua_wxLuaDebugServer_Step(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Step returns = self->Step(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool StepOver() static int LUACALL wxLua_wxLuaDebugServer_StepOver(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StepOver returns = self->StepOver(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool StepOut() static int LUACALL wxLua_wxLuaDebugServer_StepOut(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StepOut returns = self->StepOut(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool Continue() static int LUACALL wxLua_wxLuaDebugServer_Continue(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Continue returns = self->Continue(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool Break() static int LUACALL wxLua_wxLuaDebugServer_Break(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Break returns = self->Break(); // push the result flag lua_pushboolean(L, returns); return 1; } // bool Reset() static int LUACALL wxLua_wxLuaDebugServer_Reset(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Reset returns = self->Reset(); // push the result flag lua_pushboolean(L, returns); return 1; } // void DisplayStackDialog(wxWindow *pParent) static int LUACALL wxLua_wxLuaDebugServer_DisplayStackDialog(lua_State *L) { wxLuaState wxlState(L); // wxWindow pParent wxWindow * pParent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call DisplayStackDialog self->DisplayStackDialog(pParent); return 0; } // bool EvaluateExpr(int exprRef, const wxString &expr) static int LUACALL wxLua_wxLuaDebugServer_EvaluateExpr(lua_State *L) { wxLuaState wxlState(L); bool returns; // const wxString expr const wxString expr = lua2wx(wxlState.GetStringType(3)); // int exprRef int exprRef = (int)wxlState.GetNumberType(2); // get this wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call EvaluateExpr returns = self->EvaluateExpr(exprRef, expr); // push the result flag lua_pushboolean(L, returns); return 1; } static int LUACALL wxLua_wxLuaDebugServer_destructor(lua_State *L) { wxLuaState wxlState(L); wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // remove from tracked memory list if (self != 0) wxlState.RemoveTrackedMemory(self); return 0; } static int LUACALL wxLua_wxLuaDebugServer_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // remove from tracked memory list if (self != 0) if (wxlState.RemoveTrackedMemory(self)) { // if removed, reset the tag so that gc() is not called on this object. lua_pushnil(L); lua_setmetatable(L, -2); } return 0; } // Map Lua Class Methods to C Binding Functions static WXLUAMETHOD s_wxLuaDebugServer_methods[] = { { LuaConstructor, "wxLuaDebugServer", wxLua_wxLuaDebugServer_constructor, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaConstructor, "wxLuaDebugServerCompile", wxLua_wxLuaDebugServerCompile_constructor, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "StartClient", wxLua_wxLuaDebugServer_StartClient, 0, 0, { 0 } }, { LuaMethod, "StartServerThread", wxLua_wxLuaDebugServer_StartServerThread, 0, 0, { 0 } }, { LuaMethod, "AddBreakPoint", wxLua_wxLuaDebugServer_AddBreakPoint, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, { LuaMethod, "RemoveBreakPoint", wxLua_wxLuaDebugServer_RemoveBreakPoint, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, { LuaMethod, "ClearAllBreakPoints", wxLua_wxLuaDebugServer_ClearAllBreakPoints, 0, 0, { 0 } }, { LuaMethod, "Run", wxLua_wxLuaDebugServer_Run, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "Step", wxLua_wxLuaDebugServer_Step, 0, 0, { 0 } }, { LuaMethod, "StepOver", wxLua_wxLuaDebugServer_StepOver, 0, 0, { 0 } }, { LuaMethod, "StepOut", wxLua_wxLuaDebugServer_StepOut, 0, 0, { 0 } }, { LuaMethod, "Continue", wxLua_wxLuaDebugServer_Continue, 0, 0, { 0 } }, { LuaMethod, "Break", wxLua_wxLuaDebugServer_Break, 0, 0, { 0 } }, { LuaMethod, "Reset", wxLua_wxLuaDebugServer_Reset, 0, 0, { 0 } }, { LuaMethod, "DisplayStackDialog", wxLua_wxLuaDebugServer_DisplayStackDialog, 1, 1, { &s_wxluatag_wxWindow, 0 } }, { LuaMethod, "EvaluateExpr", wxLua_wxLuaDebugServer_EvaluateExpr, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, { LuaDelete, "wxLuaDebugServer", wxLua_wxLuaDebugServer_destructor, 0, 0, {0} }, { LuaMethod, "Delete", wxLua_wxLuaDebugServer_Delete, 0, 0, {0} }, }; // Extern accessor to class method map WXLUAMETHOD* wxLuaDebugServer_methods = s_wxLuaDebugServer_methods; int wxLuaDebugServer_methodCount = sizeof(s_wxLuaDebugServer_methods)/sizeof(s_wxLuaDebugServer_methods[0]); // ------------------------------------------------------------------------------------------------- // Bind class wxLuaDebugData // ------------------------------------------------------------------------------------------------- // Lua MetaTable Tag for Class int s_wxluatag_wxLuaDebugData = -1; static int LUACALL wxLua_wxLuaDebugData_destructor(lua_State *) { return 0; } // Map Lua Class Methods to C Binding Functions static WXLUAMETHOD s_wxLuaDebugData_methods[] = { { LuaDelete, "wxLuaDebugData", wxLua_wxLuaDebugData_destructor, 0, 0, {0} }, }; // Extern accessor to class method map WXLUAMETHOD* wxLuaDebugData_methods = s_wxLuaDebugData_methods; int wxLuaDebugData_methodCount = sizeof(s_wxLuaDebugData_methods)/sizeof(s_wxLuaDebugData_methods[0]); // ------------------------------------------------------------------------------------------------- // Bind class wxLuaDebugEvent // ------------------------------------------------------------------------------------------------- // Lua MetaTable Tag for Class int s_wxluatag_wxLuaDebugEvent = -1; // int GetLineNumber() const static int LUACALL wxLua_wxLuaDebugEvent_GetLineNumber(lua_State *L) { wxLuaState wxlState(L); int returns; // get this wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetLineNumber returns = self->GetLineNumber(); // push the result number lua_pushnumber(L, returns); return 1; } // int GetReference() const static int LUACALL wxLua_wxLuaDebugEvent_GetReference(lua_State *L) { wxLuaState wxlState(L); int returns; // get this wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetReference returns = self->GetReference(); // push the result number lua_pushnumber(L, returns); return 1; } // wxString GetFileName() const static int LUACALL wxLua_wxLuaDebugEvent_GetFileName(lua_State *L) { wxLuaState wxlState(L); wxString returns; // get this wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetFileName returns = self->GetFileName(); // push the result string lua_pushstring(L, wx2lua(returns) ); return 1; } // wxString GetMessage() const static int LUACALL wxLua_wxLuaDebugEvent_GetMessage(lua_State *L) { wxLuaState wxlState(L); wxString returns; // get this wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetMessage returns = self->GetMessage(); // push the result string lua_pushstring(L, wx2lua(returns) ); return 1; } // const wxLuaDebugData *GetDebugData() const static int LUACALL wxLua_wxLuaDebugEvent_GetDebugData(lua_State *L) { wxLuaState wxlState(L); const wxLuaDebugData *returns; // get this wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetDebugData returns = self->GetDebugData(); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxLuaDebugData, returns); return 1; } static int LUACALL wxLua_wxLuaDebugEvent_destructor(lua_State *L) { wxLuaState wxlState(L); wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // remove from tracked memory list if (self != 0) wxlState.RemoveTrackedMemory(self); return 0; } static int LUACALL wxLua_wxLuaDebugEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // remove from tracked memory list if (self != 0) if (wxlState.RemoveTrackedMemory(self)) { // if removed, reset the tag so that gc() is not called on this object. lua_pushnil(L); lua_setmetatable(L, -2); } return 0; } // Map Lua Class Methods to C Binding Functions static WXLUAMETHOD s_wxLuaDebugEvent_methods[] = { { LuaMethod, "GetLineNumber", wxLua_wxLuaDebugEvent_GetLineNumber, 0, 0, { 0 } }, { LuaMethod, "GetReference", wxLua_wxLuaDebugEvent_GetReference, 0, 0, { 0 } }, { LuaMethod, "GetFileName", wxLua_wxLuaDebugEvent_GetFileName, 0, 0, { 0 } }, { LuaMethod, "GetMessage", wxLua_wxLuaDebugEvent_GetMessage, 0, 0, { 0 } }, { LuaMethod, "GetDebugData", wxLua_wxLuaDebugEvent_GetDebugData, 0, 0, { 0 } }, { LuaDelete, "wxLuaDebugEvent", wxLua_wxLuaDebugEvent_destructor, 0, 0, {0} }, { LuaMethod, "Delete", wxLua_wxLuaDebugEvent_Delete, 0, 0, {0} }, }; // Extern accessor to class method map WXLUAMETHOD* wxLuaDebugEvent_methods = s_wxLuaDebugEvent_methods; int wxLuaDebugEvent_methodCount = sizeof(s_wxLuaDebugEvent_methods)/sizeof(s_wxLuaDebugEvent_methods[0]); |