From: John L. <jr...@us...> - 2007-06-05 21:07:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30959/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h wxlstate.h Log Message: Fix a number of bugs with the new bindings fix override wxConfig::Get fix looking up overloaded static and non static class member functions fix looking up class member functions overloaded from a base class Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxldefs.h 31 May 2007 17:18:54 -0000 1.17 --- wxldefs.h 5 Jun 2007 21:07:25 -0000 1.18 *************** *** 57,61 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 7 // ---------------------------------------------------------------------------- --- 57,61 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 8 // ---------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** wxlbind.h 31 May 2007 17:18:54 -0000 1.40 --- wxlbind.h 5 Jun 2007 21:07:25 -0000 1.41 *************** *** 52,56 **** WXLUAMETHOD_SETPROP = 0x0010, // Set %property funcName, write ! WXLUAMETHOD_STATIC = 0x0020 // Class member function is static }; --- 52,64 ---- WXLUAMETHOD_SETPROP = 0x0010, // Set %property funcName, write ! WXLUAMETHOD_STATIC = 0x1000, // Class member function is static ! WXLUAMETHOD_OVERLOAD = 0x2000, // This is an overload function that will call others ! // and the min/maxargs for it are not valid, ! // but are the min and max of all functions ! ! WXLUAMETHOD_OVERLOAD_BASE = 0x4000, // Class method has been checked to see if it is ! // overloaded from the base class. ! // Check WXLUAMETHOD::basemethod and if !NULL ! // this method is an overload from the base class }; *************** *** 61,64 **** --- 69,73 ---- { lua_CFunction func; // function that implements the method or property + int type; // wxLuaMethod_Type flags for this function int minargs; // min number of required args int maxargs; // total number of args allowed *************** *** 68,75 **** struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property { ! int type; // type (one of the above enumeration values) ! const char* name; // name of the method or property ! WXLUAMETHOD_CFUNC* funcs; // array of functions for this method int funcs_n; // number of functions (overloaded > 1) for this method }; --- 77,86 ---- struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property { ! int type; // wxLuaMethod_Type flags for this method ! // note each func has own type, this is ored values of them ! const char *name; // name of the method or property ! WXLUAMETHOD_CFUNC *funcs; // array of functions for this method int funcs_n; // number of functions (overloaded > 1) for this method + WXLUAMETHOD *basemethod; // overloaded methods from base class, else NULL }; *************** *** 342,346 **** // in the WXLUAEVENT* struct list of this binding. wxString GetEventTypeName(wxEventType eventType) const; ! // Get all the bindings that were initialized using the generated binding // function wxLuaBinding_[binding name]_init(). --- 353,360 ---- // in the WXLUAEVENT* struct list of this binding. wxString GetEventTypeName(wxEventType eventType) const; ! // Get the first WXLUACLASS that has this WXLUAMETHOD ! const WXLUACLASS* GetLuaClass(const WXLUAMETHOD* wxlMethod) const; ! // Get the first WXLUACLASS that has this WXLAMETHOD_CFUNC ! const WXLUACLASS* GetLuaClass(const WXLUAMETHOD_CFUNC* wxlMethod_cfunc) const; // Get all the bindings that were initialized using the generated binding // function wxLuaBinding_[binding name]_init(). Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** wxlstate.h 31 May 2007 17:18:54 -0000 1.68 --- wxlstate.h 5 Jun 2007 21:07:25 -0000 1.69 *************** *** 485,488 **** --- 485,492 ---- // returns NULL on failure. const WXLUACLASS* GetLuaClass(const char* className) const; + // Get the first WXLUACLASS that has this particular WXLUAMETHOD + const WXLUACLASS* GetLuaClass(const WXLUAMETHOD* method) const; + // Get the first WXLUACLASS that has this particular WXLUAMETHOD_CFUNC in it's methods + const WXLUACLASS* GetLuaClass(const WXLUAMETHOD_CFUNC* method_cfunc) const; // Get base WXLUACLASS for given Tag using WXLUACLASS::class_tag and // WXLUACLASS::baseclass_tag. returns NULL on failure. *************** *** 670,674 **** // else return NULL; // Set isProperty to true if a property is found else it is a method. ! WXLUAMETHOD* GetLuaMethod(const WXLUACLASS *pClass, const char *cpIndex); // Lookup a lua property function named cpIndex in the WXLUACLASS pClass // Ensure that the lookup is of the required type. If the lua property --- 674,678 ---- // else return NULL; // Set isProperty to true if a property is found else it is a method. ! WXLUAMETHOD* GetLuaMethod(const WXLUACLASS *wxlClass, const char *methodName); // Lookup a lua property function named cpIndex in the WXLUACLASS pClass // Ensure that the lookup is of the required type. If the lua property *************** *** 677,681 **** // else return NULL; // Find 'Set' properties if isLuaSetProp else return 'WXLUAMETHOD_GETPROP' property ! WXLUAMETHOD* GetLuaProperty(const WXLUACLASS *pClass, const char *cpIndex, bool isLuaSetProp); // Is there a derived method given an object and and a method name. --- 681,685 ---- // else return NULL; // Find 'Set' properties if isLuaSetProp else return 'WXLUAMETHOD_GETPROP' property ! WXLUAMETHOD* GetLuaProperty(const WXLUACLASS *wxlClass, const char *propName, bool isLuaSetProp); // Is there a derived method given an object and and a method name. |