in reply to Base class constructor that blesses into subclass
It seems that you're planning to directly bless the instance into different child classes.
It would be clean, and quite acceptible, to call the proper constructor for each derived class instead. That is, the factory function figures out which derived class to use, then calls 'new' on it. The factory method never directly creates or blesses anything.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Base class constructor that blesses into subclass
by mp (Deacon) on Jul 08, 2002 at 20:44 UTC |