in reply to Re: Decorator(?) classes and inheritance
in thread Decorator(?) classes and inheritance
Decorator B should not "inherit" anything from A; they are more of a 'friend' relationship.
Actually, it's common for decorator classes to inherit from the base class that they decorate. That way they get the same interface, isa works, etc. The examples in the GOF book do exactly this.
|
|---|