Skip to content

missing fields in the Prototype Pattern #7

@borcun

Description

@borcun

Hi Jakub,

It might be late, but helpful to anybody. The Prototype Pattern example seems like a factory pattern, at least I think so. Please, correct me if I am wrong.

The class that implements the Prototype Pattern should create an exact copy of the class instance, thus it means that you should not create a new empty object not including data members of the class and need a copy constructor. In your example, there is no data member in the class, but it might be meaningful if you put some there, in particular private or protected ones.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions