This repository has been archived on 2022-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
patterns-old/lesson_4/ChicagoPizzaIngredientFacto...

53 lines
1.0 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* ChicagoPizzaIngredientFactory.hpp
*
* Created on: 3 нояб. 2021 г.
* Author: alexander
*/
#pragma once
#include "PizzaIngredientFactory.hpp"
#include "Cheese.hpp"
#include "Sauce.hpp"
#include "Dough.hpp"
#include "Veggies.hpp"
#include "Pepperoni.hpp"
#include "Clams.hpp"
class ChicagoPizzaIngredientFactory: public PizzaIngredientFactory
{
public:
Dough* createDough() const override
{
return new ThickCrustDough();
}
Sauce* createSauce() const override
{
return new PlumTomatoSauce();
}
Cheese* createCheese() const override
{
return new MozzarellaCheese();
}
std::vector<Veggies*> createVeggies() const override
{
std::vector<Veggies*> veggies { new BlackOlivesVeggies(), new SpinachVeggies(), new EggplantVeggies() };
return veggies;
}
Pepperoni* createPepperoni() const override
{
return new SlicedPepperoni();
}
Clams* createClam() const override
{
return new FrozenClams();
}
};