[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
creating prototype objects
- To: <mark>, <tribble>
- Subject: creating prototype objects
- From: Chris Hibbert <hibbert>
- Date: Fri, 9 Nov 90 15:46:26 PST
- Cc: <xtech>
(I'm resending this because the first try bounced. When I send
mail from emacs to a list, I always get a rejection notice.)
Shepherd::changeClassToThatOf(Shepherd * anInstance) requires an
actual object with a real vtable in order to work. To fill that need,
you've designed the Locking/unlocking mechanism to create a prototype
object of each Shepherd class and their locking subclasses. The
prototype is then used in the lock() or unlock() method as an
argument to changeClassToThatOf().
I don't know how to automatically write a call on the constructor for
these classes in order to create the prototypes we need. Each of the
classes has a different set of constructors. I can't think of any
reasonable way to build the pieces using either Stubble or the
protocol macro (UNLOCK) which I've already inserted in the headers of
all of Shepherd's subclasses.
The only (unreasonable?) idea I have is to automatically generate a
hidden constructor for each of the lockable classes that I can call to
make the prototypes. [Bletch!] Did you have something else in mind
already, or can you think of some (reasonable) way of solving this?
I need a constructor for the subclass as well, but I think that won't
be hard to build, even though I haven't done it yet.
----- End Included Message -----