-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPepperoniPizza.hpp
More file actions
29 lines (24 loc) · 734 Bytes
/
PepperoniPizza.hpp
File metadata and controls
29 lines (24 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef PEPPERONI_PIZZA_H
#define PEPPERONI_PIZZA_H
#include "Pizza.hpp"
#include "Pizza.hpp"
class PepperoniPizza : Pizza {
public:
PepperoniPizza() = default;
PepperoniPizza(std::unique_ptr<PizzaIngredientFactory> infac) : ingredientFactory(std::move(infac)) {}
void prepare() override;
private:
std::unique_ptr<PizzaIngredientFactory> ingredientFactory{nullptr};
};
inline
void
PepperoniPizza::prepare()
{
std::cout << "Preparing " << name << '\n';
dough = ingredientFactory->createDough();
sauce = ingredientFactory->createSauce();
cheese = ingredientFactory->createCheese();
veggies = ingredientFactory->createPepperonis();
pepperoni = ingredientFactory->createPepperoni();
}
#endif /* PEPPERONI_PIZZA_H */