44 lines
870 B
C++
44 lines
870 B
C++
/*
|
||
* NYPizzaStore.hpp
|
||
*
|
||
* Created on: 2 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include "PizzaStore.hpp"
|
||
#include "NYStylePiza.hpp"
|
||
#include "NYStyleCheesePiza.hpp"
|
||
#include "NYStyleVeggiePizza.hpp"
|
||
#include "NYStyleClamPizza.hpp"
|
||
#include "NYStylePepperoniPizza.hpp"
|
||
|
||
class NYPizzaStore: public PizzaStore
|
||
{
|
||
public:
|
||
Pizza createPizza(const std::string &type) const override
|
||
{
|
||
if (type == "cheese")
|
||
{
|
||
return NYStyleCheesePiza();
|
||
}
|
||
else if (type == "veggie")
|
||
{
|
||
return NYStyleVeggiePizza();
|
||
}
|
||
else if (type == "clam")
|
||
{
|
||
return NYStyleClamPizza();
|
||
}
|
||
else if (type == "pepperoni")
|
||
{
|
||
return NYStylePepperoniPizza();
|
||
}
|
||
else
|
||
{
|
||
return NYStylePiza();
|
||
}
|
||
}
|
||
};
|