
prototype
specify kinds of objects to create using a prototypical instance and create by copying this prototype
motivation
- flexibility, reduce number of classes
applicability
- when classes to instantiate are specified at runtime
- to avoid building a class hierarchy of factories
- to reduce static dependencies
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