44 lines
934 B
C++
44 lines
934 B
C++
/*
|
||
* ChicagoPizzaStore.hpp
|
||
*
|
||
* Created on: 2 нояб. 2021 г.
|
||
* Author: alexander
|
||
*/
|
||
|
||
#pragma once
|
||
|
||
#include "PizzaStore.hpp"
|
||
#include "ChicagoStylePizza.hpp"
|
||
#include "ChicagoStyleCheesePizza.hpp"
|
||
#include "ChicagoStyleVeggiePizza.hpp"
|
||
#include "ChicagoStyleClamPizza.hpp"
|
||
#include "ChicagoStylePepperoniPizza.hpp"
|
||
|
||
class ChicagoPizzaStore: public PizzaStore
|
||
{
|
||
public:
|
||
Pizza createPizza(const std::string &type) const override
|
||
{
|
||
if (type == "cheese")
|
||
{
|
||
return ChicagoStyleCheesePizza();
|
||
}
|
||
else if (type == "veggie")
|
||
{
|
||
return ChicagoStyleVeggiePizza();
|
||
}
|
||
else if (type == "clam")
|
||
{
|
||
return ChicagoStyleClamPizza();
|
||
}
|
||
else if (type == "pepperoni")
|
||
{
|
||
return ChicagoStylePepperoniPizza();
|
||
}
|
||
else
|
||
{
|
||
return ChicagoStylePizza();
|
||
}
|
||
}
|
||
};
|