From: John L. <jr...@us...> - 2006-12-01 06:25:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1213/wxLua/modules/wxlua/include Modified Files: wxlbind.h Log Message: removed TRUE/FALSE pushed into lua since lua has true/false now removed pointers to functions in wxLuaBinding, just use the member vars Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxlbind.h 6 Nov 2006 06:11:44 -0000 1.25 --- wxlbind.h 1 Dec 2006 06:25:47 -0000 1.26 *************** *** 22,25 **** --- 22,29 ---- } + #ifdef GetObject + #undef GetObject + #endif + class WXDLLIMPEXP_WXLUA wxLuaBinding; class WXDLLIMPEXP_WXLUA wxLuaState; *************** *** 113,123 **** }; - typedef WXLUACLASS* (*wxLuaGetClassListFunction)(size_t &); - typedef WXLUADEFINE* (*wxLuaGetDefineListFunction)(size_t &); - typedef WXLUASTRING* (*wxLuaGetStringListFunction)(size_t &); - typedef WXLUAEVENT* (*wxLuaGetEventListFunction)(size_t &); - typedef WXLUAOBJECT* (*wxLuaGetObjectListFunction)(size_t &); - typedef WXLUAMETHOD* (*wxLuaGetBuiltinListFunction)(size_t &); - // ---------------------------------------------------------------------------- // wxLuaFunction - a proxy class to store a reference to a Lua function. --- 117,120 ---- *************** *** 156,163 **** // ---------------------------------------------------------------------------- - #ifdef GetObject - #undef GetObject - #endif - enum wxLuaObject_Type { --- 153,156 ---- *************** *** 224,228 **** // ---------------------------------------------------------------------------- ! #define WXLUA_NO_DLLIMPEXP // use if you don't want to export #define WXLUA_NO_DLLIMPEXP_DATA(x) x // use if you don't want to export data --- 217,221 ---- // ---------------------------------------------------------------------------- ! #define WXLUA_NO_DLLIMPEXP // use if you don't want to export class #define WXLUA_NO_DLLIMPEXP_DATA(x) x // use if you don't want to export data *************** *** 233,237 **** { \ public: \ ! wxObject_##objName(className *p_##objName); \ ~wxObject_##objName(); \ private: \ --- 226,230 ---- { \ public: \ ! wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \ ~wxObject_##objName(); \ private: \ *************** *** 242,252 **** #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject) \ - wxObject_##objName::wxObject_##objName(className *p##objName) \ - :m_p##objName(p##objName) {} \ - \ wxObject_##objName::~wxObject_##objName() \ { \ ! if (m_p##objName != NULL) \ ! delete m_p##objName; \ } \ void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, className *p##objName) \ --- 235,241 ---- #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject) \ wxObject_##objName::~wxObject_##objName() \ { \ ! if (m_p##objName != NULL) delete m_p##objName; \ } \ void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, className *p##objName) \ *************** *** 308,325 **** virtual ~wxLuaBinding() {} - // Initialize the binding members from the binding functions - // automatically called in generated binding code - void Initialize(); // override this to generate a "new" version of subclassed bindings virtual wxLuaBinding* Clone() const { return new wxLuaBinding; } - // Pointers to external Binding Functions (use accessors below) - wxLuaGetClassListFunction pfGetClassList; - wxLuaGetDefineListFunction pfGetDefineList; - wxLuaGetStringListFunction pfGetStringList; - wxLuaGetEventListFunction pfGetEventList; - wxLuaGetObjectListFunction pfGetObjectList; - wxLuaGetBuiltinListFunction pfGetBuiltinList; - // Binds C Functions/Defines/Object/Events to namespace Lua Table virtual void RegisterBinding(const wxLuaState& wxlState, bool registerTypes); --- 297,303 ---- *************** *** 346,355 **** WXLUAOBJECT* GetLuaObjectList() { return m_objectList; } ! size_t GetLuaBuiltinCount() { return m_builtinCount; } ! WXLUAMETHOD* GetLuaBuiltinList() { return m_builtinList; } bool IsTag(int tag) { return (tag >= m_startTag) && (tag <= m_lastTag); } ! // Look for base class in binding, set baseclass_tag bool SetBaseClassTag(WXLUACLASS *pClass); --- 324,334 ---- WXLUAOBJECT* GetLuaObjectList() { return m_objectList; } ! size_t GetLuaFunctionCount() { return m_functionCount; } ! WXLUAMETHOD* GetLuaFunctionList() { return m_functionList; } bool IsTag(int tag) { return (tag >= m_startTag) && (tag <= m_lastTag); } ! // Look for the base class of the input WXLUACLASS in this binding and if ! // found, set the tag of the baseclass_tag member of the input. bool SetBaseClassTag(WXLUACLASS *pClass); *************** *** 358,363 **** wxString GetEventTypeName(wxEventType e_type); ! // Get all the bindings that were created ! static wxLuaBindingList* GetBindingList() { return &sm_bindings; } protected: --- 337,345 ---- wxString GetEventTypeName(wxEventType e_type); ! // Get all the bindings that were initialized using the generated binding ! // function wxLuaBinding_[binding name]_init(). ! // You can adjust the list *only* if you do not have any wxLuaStates ! // created, otherwise the tags will be out of sync. ! static wxLuaBindingList* GetBindingList() { return &sm_bindingList; } protected: *************** *** 382,389 **** size_t m_objectCount; WXLUAOBJECT* m_objectList; ! size_t m_builtinCount; ! WXLUAMETHOD* m_builtinList; ! wxString m_nameSpace; // lua namespace e.g. "wx" bool m_typesRegistered; // Is the binding registered int m_startTag; // The first wxLua allocated lua tag --- 364,371 ---- size_t m_objectCount; WXLUAOBJECT* m_objectList; ! size_t m_functionCount; ! WXLUAMETHOD* m_functionList; ! wxString m_nameSpace; // lua table namespace e.g. "wx" bool m_typesRegistered; // Is the binding registered int m_startTag; // The first wxLua allocated lua tag *************** *** 391,395 **** int m_wxLuaTable; // The lua tag for the wxLua private tables ! static wxLuaBindingList sm_bindings; DECLARE_DYNAMIC_CLASS(wxLuaBinding) --- 373,377 ---- int m_wxLuaTable; // The lua tag for the wxLua private tables ! static wxLuaBindingList sm_bindingList; DECLARE_DYNAMIC_CLASS(wxLuaBinding) |