I have an abstract base class with two inherited classes. In both these classes I define a virtual method that is used by the constructor. Now I need to create a copy constr
There is a nice discussion of the Prototype Pattern here which could be helpful.
Prototype [Go4]
Problem
A "factory" class can't anticipate the type of "product" objects it must create.
Solution
Derive all product classes from an abstract Product base class that declares a pure virtual clone() method. The Product base class also functions as the product factory by providing a static factory method called makeProduct(). This function uses a type description parameter to locate a prototype in a static prototype table maintained by the Product base class. The prototype clones itself, and the clone is returned to the caller.
The reference to 'Go4' is for the seminal book on Design Patterns written by the "Gang of Four" authors.