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/NYPizzaIngredientFactory.hpp

53 lines
1.0 KiB
C++
Raw Permalink Normal View History

2021-11-03 15:35:58 +00:00
/*
* NYPizzaIngredientFactory.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 NYPizzaIngredientFactory: public PizzaIngredientFactory
{
public:
Dough* createDough() const override
{
return new ThinCrustDough();
}
Sauce* createSauce() const override
{
return new MarinaraSauce();
}
Cheese* createCheese() const override
{
return new ReggianoCheese();
}
std::vector<Veggies*> createVeggies() const override
{
std::vector<Veggies*> veggies { new GarlicVeggies(), new OnionVeggies(), new MushroomVeggies(), new RedPepperVeggies() };
return veggies;
}
Pepperoni* createPepperoni() const override
{
return new SlicedPepperoni();
}
Clams* createClam() const override
{
return new FreshClams();
}
};