Changes to how overridable C++ methods are virtualized for Python.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37369 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-02-07 03:56:44 +00:00
parent e4c37d10dd
commit a7a0141800
25 changed files with 890 additions and 766 deletions

View File

@@ -381,6 +381,23 @@ typedef unsigned long wxUIntPtr;
%enddef
#endif
//---------------------------------------------------------------------------
// Generates a base_On* method that just wraps a call to the On*, and mark it
// deprecated. We need this because there is no longer any need for a
// base_On* method to be able to call the C++ base class method, since our
// virtualization code can now sense when an attempt is being made to call
// the base class version from the derived class override.
%define %MAKE_BASE_FUNC(Class, Method)
%pythoncode {
def base_##Method(*args, **kw):
return Class.Method(*args, **kw)
base_##Method = wx._deprecated(base_##Method,
"Please use Class.Method instead.")
}
%enddef
//---------------------------------------------------------------------------
// Forward declarations and %renames for some classes, so the autodoc strings
// will be able to use the right types even when the real class declaration is