Update of /cvsroot/wxlua/wxLua/modules/wxlua/include
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26676/wxLua/modules/wxlua/include
Modified Files:
wxlbind.h
Log Message:
make using C++ namespaces ns::MyClass work for binding generator
Index: wxlbind.h
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** wxlbind.h 23 May 2006 18:34:33 -0000 1.21
--- wxlbind.h 9 Jun 2006 03:24:50 -0000 1.22
***************
*** 152,185 ****
// Declare the macros used to define and implement classes that
// wrap non-wxObject derived pointers used by wxLua in the bindings.
// ----------------------------------------------------------------------------
! #define wxLUA_DECLARE_ENCAPSULATION(IMPEXPSYMBOL, theObject) \
! class theObject; \
! IMPEXPSYMBOL void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, theObject *); \
! class IMPEXPSYMBOL wxObject_##theObject : public wxObject \
{ \
public: \
! wxObject_##theObject(theObject *p_##theObject); \
! ~wxObject_##theObject(); \
private: \
! theObject *m_p##theObject; \
/* Don't put a final semicolon on DECLARE_XXX stuff as borland doesn't like it */ \
! DECLARE_ABSTRACT_CLASS(wxObject_##theObject) \
};
! #define wxLUA_IMPLEMENT_ENCAPSULATION(theObject) \
! IMPLEMENT_ABSTRACT_CLASS(wxObject_##theObject, wxObject); \
! wxObject_##theObject::wxObject_##theObject(theObject *p##theObject) \
! :m_p##theObject(p##theObject) \
{ \
} \
! wxObject_##theObject::~wxObject_##theObject() \
{ \
! if (m_p##theObject != NULL) \
! delete m_p##theObject; \
} \
! void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, theObject *p##theObject) \
{ \
! wxlState.AddToTrackedMemoryList((long)p##theObject, new wxObject_##theObject(p##theObject)); \
}
--- 152,194 ----
// Declare the macros used to define and implement classes that
// wrap non-wxObject derived pointers used by wxLua in the bindings.
+ //
+ // IMPEXPSYMBOL : similiar to WXDLLIMPEXP_WXBIND, you cannot leave this
+ // parameter empty, but you can "#define DUMMYDLLIMPEMP" to nothing
+ // if you don't want DLL export symbols.
+ // className : name of the class to encapsulate (may be NameSpace::MyClass)
+ // objName : name to use in naming the encapsulation class (NameSpace_MyClass)
// ----------------------------------------------------------------------------
! #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
!
! #define wxLUA_DECLARE_ENCAPSULATION(IMPEXPSYMBOL, className, objName) \
! class className; \
! IMPEXPSYMBOL void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, className *); \
! class IMPEXPSYMBOL wxObject_##objName : public wxObject \
{ \
public: \
! wxObject_##objName(className *p_##objName); \
! ~wxObject_##objName(); \
private: \
! className *m_p##objName; \
/* Don't put a final semicolon on DECLARE_XXX stuff as borland doesn't like it */ \
! DECLARE_ABSTRACT_CLASS(wxObject_##objName) \
};
! #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) \
{ \
! wxlState.AddToTrackedMemoryList((long)p##objName, new wxObject_##objName(p##objName)); \
}
|