Re: Abstract classes and methods
Re: Abstract classes and methods
- Subject: Re: Abstract classes and methods
- From: Aaron Tuller <email@hidden>
- Date: Wed, 29 Aug 2001 01:35:28 -0700
and think protocols for methods that you want others to implement.
protocols are really useful.
-aaron
At 9:47 PM -0700 8/28/01, Chris Gehlker wrote:
On 8/29/01 8:54 PM, "stuartbryson" <email@hidden> wrote:
In C++ it is possible to force both classes and methods to be abstract.
That is classes that cannot be instantiated without being subclassed and
particular methods overrided. How do I force abstract classes and
methods in Obj-C.
AFAICT you can't. And you wouldn't want to if you could. Remember, pure
virtual classes occur at the top of inheritance trees to define the
interface to the tree. But in ObjC every class is a descendent of NSObject:
you never define the top of the tree. Even a class that functions as a pure
virtual class is going to have to define init as [super init] and dealloc as
[super dealloc].
Think Java, not C++, here.