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 Normal View History

2021-11-03 15:35:58 +00:00
/*
* 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();
}
};