prototype

specify kinds of objects to create using a prototypical instance and create by copying this prototype

motivation

  • flexibility, reduce number of classes

applicability

participants

  • Prototype, ConcretePrototype, Client

consequences

  • adding and removing product types at runtime
  • specifying new objects by varying value/structure
  • reduced subclassing
  • configure an application with classes dynamically see kit.h and dv/tk/kit.c

related

  • AbstractFactory versus Prototype