From 47b99a15710c2b0f369a49faec85a675f624e65c Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Sat, 31 Jan 2004 01:49:51 +0000 Subject: [PATCH] removed PureVirtual class --- direct/src/showbase/PythonUtil.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 389a03778a..f3f996b775 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -747,18 +747,6 @@ def describeException(backTrace = 4): description += "%s: %s" % (exceptionName, extraInfo) return description -class PureVirtual: - """ Python classes that want to have C++-style pure-virtual functions - can derive from this class and call 'derivedMustOverride' from their - 'pure virtual' methods. Such Python classes can still be instantiated, - but they will give an informative error when a pure-virtual method - is invoked. """ - def derivedMustOverride(self): - """ call this function from methods that must be overriden - and are not meant to be chained down to. This simulates C++ - pure-virtual methods. """ - raise 'error: derived class must implement %s' % callerInfo()[2] - def mostDerivedLast(classList): """pass in list of classes. sorts list in-place, with derived classes appearing after their bases"""