The way around this is to have subclasses register with their parent class. Then, the parent consults a registry before instantiation a class, rather than hard-coding knowledge of the class hierarchy.
In reply to Re: Re: Constructor/Factory Orthodoxy
by dws
in thread Constructor/Factory Orthodoxy
by mojotoad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |