Next: Structure and Participants
Up: External Polymorphism An Object
Previous: Motivation
Use the External Polymorphism pattern when:
- Your class libraries contain concrete data types
that cannot inherit from a common base class
containing virtual methods; and
- The behavior of your class libraries or applications can be simplified
significantly if you can treat all objects in a polymorphic manner.
Do not use the External Polymorphism pattern when:
- Your class libraries already contain abstract data types
that inherit from common base classes and
contain virtual methods; or
- Your programming language or programming environment allows
methods to be added to classes dynamically.
Chris Cleeland
Tue Oct 22 01:20:58 CDT 1996