From: John L. <jr...@us...> - 2006-11-06 06:11:47
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21901/wxLua/modules/wxlua/include Modified Files: wxlbind.h Log Message: code cleanup add %wxchkver_x_y_z as replacement for %wxchkverxyz Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxlbind.h 2 Oct 2006 21:19:23 -0000 1.24 --- wxlbind.h 6 Nov 2006 06:11:44 -0000 1.25 *************** *** 51,55 **** }; ! typedef int* wxLuaArgTag; // address of class tag struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property --- 51,55 ---- }; ! typedef int* wxLuaArgTag; // address of class tag (a pointer to it) struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property *************** *** 64,67 **** --- 64,68 ---- // wxlua arg tags for common lua types + extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_None; extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_String; extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_Boolean; *************** *** 73,77 **** extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_LuaFunction; ! struct WXDLLIMPEXP_WXLUA WXLUACLASS // defines a LUA class interface { const char *name; // name of the class --- 74,78 ---- extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_LuaFunction; ! struct WXDLLIMPEXP_WXLUA WXLUACLASS // defines a LUA C++ class interface { const char *name; // name of the class *************** *** 161,169 **** enum wxLuaObject_Type { ! wxLUAOBJECT_NONE = 0, // nothing is allocated ! wxLUAOBJECT_BOOL = 1, // bool allocated ! wxLUAOBJECT_INT = 2, // int allocated ! wxLUAOBJECT_STRING = 4, // wxString allocated ! wxLUAOBJECT_ARRAYINT = 8 // wxArrayInt allocated }; --- 162,170 ---- enum wxLuaObject_Type { ! wxLUAOBJECT_NONE = 0, // nothing is allocated ! wxLUAOBJECT_BOOL = 1, // bool allocated ! wxLUAOBJECT_INT = 2, // int allocated ! wxLUAOBJECT_STRING = 4, // wxString allocated ! wxLUAOBJECT_ARRAYINT = 8 // wxArrayInt allocated }; *************** *** 172,190 **** public: wxLuaObject(); ! // Constructor that is passed a lua state and a parameter index. ! wxLuaObject(lua_State* L, int iParam, int iRef = 1); ! // Constructor that is passed a lua state and a parameter index. ! wxLuaObject(const wxLuaState& wxlState, int iParam, int iRef = 1); ! ~wxLuaObject(); ! // Get the value of the reference object (or a proxy if the object has ! // been aliased for a wxValidator class. bool GetObject(); ! // Remove any existing reference and allocate another ! void SetObject(int iParam); ! // Set the reference and lua state up from a supplied parameter. ! void SetObject(lua_State *L, int iParam); ! // The following methods are used by the wxValidator interface bool *GetBoolPtr(); int *GetIntPtr(); --- 173,188 ---- public: wxLuaObject(); ! // Constructor that is passed a lua state and a parameter index. ! wxLuaObject(const wxLuaState& wxlState, int iParam = 1); ! virtual ~wxLuaObject(); ! ! // Get the value of the reference object (or a proxy if the object has ! // been aliased for a wxValidator class. bool GetObject(); ! // Remove any existing reference and allocate another ! void SetObject(int iParam = 1); ! // The following methods are used by the wxValidator interface bool *GetBoolPtr(); int *GetIntPtr(); *************** *** 192,201 **** wxArrayInt *GetArrayPtr(); ! // Return a flag value that indicated whether the ! // object is being used by a wxValidator class (else 0). int GetAllocationFlags() const { return m_alloc_flags; } ! bool HasAllocationFlag(wxLuaObject_Type flag) const { return (m_alloc_flags & flag) != 0; } ! // Allow the flag value to be manipulated. ! void ModifyAllocationFlags(int iValue); wxLuaState GetwxLuaState() const; --- 190,199 ---- wxArrayInt *GetArrayPtr(); ! // Return a flag value that indicated whether the ! // object is being used by a wxValidator class (else 0). int GetAllocationFlags() const { return m_alloc_flags; } ! bool HasAllocationFlag(wxLuaObject_Type flag) const { return (m_alloc_flags & flag) != 0; } ! // Set or remove the single or ored allocation flag(s) ! int SetAllocationFlag(wxLuaObject_Type flag, bool set); wxLuaState GetwxLuaState() const; *************** *** 209,214 **** wxString m_string; wxArrayInt m_arrayInt; ! int m_alloc_flags; ! DECLARE_DYNAMIC_CLASS(wxLuaObject) }; --- 207,213 ---- wxString m_string; wxArrayInt m_arrayInt; ! int m_alloc_flags; ! ! DECLARE_ABSTRACT_CLASS(wxLuaObject) }; |