next up previous
Next: Structure and Participants Up: External Polymorphism An Object Previous: Motivation

Applicability

Use the External Polymorphism pattern when:

  1. Your class libraries contain concrete data types that cannot inherit from a common base class containing virtual methods; and
  2. 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:

  1. Your class libraries already contain abstract data types that inherit from common base classes and contain virtual methods; or
  2. Your programming language or programming environment allows methods to be added to classes dynamically.


Chris Cleeland
Tue Oct 22 01:20:58 CDT 1996