builder_pattern::ConcreteBuilder
-
class ConcreteBuilder : public builder_pattern::Builder
Concrete implementation of the Builder interface.
The
ConcreteBuilderclass constructs a specific type of product by implementing the steps defined in theBuilderinterface.Public Functions
-
ConcreteBuilder()
Constructor initializes a new
Productinstance.Constructs a new
ConcreteBuilderand initializes a product.Creates a new
Productinstance and initializes the builder.Initializes the builder with a fresh
Productinstance for construction.
-
virtual void buildPartA() override
Builds Part A of the product.
Builds Part A of the product.
Defines the step required to construct Part A of the product.
Sets Part A of the product to a specific value defined by the builder.
-
virtual void buildPartB() override
Builds Part B of the product.
Builds Part B of the product.
Defines the step required to construct Part B of the product.
Sets Part B of the product to a specific value defined by the builder.
-
virtual std::shared_ptr<Product> getResult() override
Retrieves the constructed product.
Retrieves the constructed product.
After all parts of the product are built, this method returns the fully constructed product.
Returns the fully constructed product after all parts have been built.
-
ConcreteBuilder()