factory_method_pattern::Creator

class Creator

Abstract Creator (Factory) class.

Declares a factory method to create products. Subclasses will override the createProduct method to specify the type of product to create.

Subclassed by factory_method_pattern::ConcreteCreatorA, factory_method_pattern::ConcreteCreatorB

Public Functions

virtual std::unique_ptr<Product> createProduct() const = 0

Factory method to create a Product.

Returns:

A unique pointer to a newly created Product.