RE: Abstract classes and methods
RE: Abstract classes and methods
- Subject: RE: Abstract classes and methods
- From: "Smith, Bradley" <email@hidden>
- Date: Wed, 29 Aug 2001 15:30:42 +0100
>
You've got the terms backward here Bradley. At least
>
according to Stroustrup
>
and Meyers a "virtual" class has one or more pure virtual functions.
>
>
An abstract class has a virtual, not pure virtual,
>
destructor. All virtual
>
classes are abstract but the converse is not true.
>
>
A concrete class has a destructor that is not declared
>
virtual. It may be
>
virtual by virtue of inheritance but that's not important.
>
<snip>
Seems I was talking about methods whilst everyone else is talking about
classes. Anyway, what I said still holds true. Coming from C++ I tend to
think of the effect that virtual and pure virtual methods have on my class
as opposed to deciding what type of class I have. If I have a pure method
then my class is abstract (in the English sense of the word) in that there
can never be an instance of that class.
Brad