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.
In reply to Re^2: Decorator(?) classes and inheritance
by adrianh
in thread Decorator(?) classes and inheritance
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |