GoF Statement of Intent:![]() |
Specify the kinds of objects to create using a prototypical instance,
and create new objects by copying this prototype. |
Brief Overview:![]() |
Prototype is a creation design pattern in which the type of objects to be
created are cloned from a prototypical instance to create new objects. A base
class is created which contains a virtual clone() function. Subclasses
then represent the objects to be created. Calling clone() on one of the base
classes creates an instance of the object identical to the prototype which can
then be specialized as needed. |
UML Diagram: |
![]() |