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 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.

/*
* 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();
}
};