A visitor used for ordering items from various shops. The user starts with an instance of this class and a list of what they want to order. More...
#include <Visitor_Visitor_Class.h>
Public Member Functions | |
OrderVisitor (StringList itemsToOrder) | |
Constructor. | |
void | VisitBaker (Visitor_Baker *shop) override |
Let the visitor visit a Visitor_Baker shop. | |
void | VisitButcher (Visitor_Butcher *shop) override |
Let the visitor visit a Visitor_Butcher shop. | |
void | VisitPickleGrocer (Visitor_PickleGrocer *shop) override |
Let the visitor visit a Visitor_PickleGrocer shop. | |
void | VisitCondimentGrocer (Visitor_CondimentGrocer *shop) override |
Let the visitor visit a Visitor_CondimentGrocer shop. | |
void | VisitVegetableGrocer (Visitor_VegetableGrocer *shop) override |
Let the visitor visit a Visitor_VegetableGrocer shop. | |
void | VisitMaker (Visitor_Maker *shop) override |
Let the visitor visit a Visitor_Maker shop. | |
void | VisitRestaurant (Visitor_Restaurant *shop) override |
Let the visitor visit a Visitor_Restaurant shop. | |
virtual void | VisitRestaurant (Visitor_Restaurant *shop) |
Let the visitor visit a Visitor_Restaurant shop. | |
virtual void | VisitButcher (Visitor_Butcher *shop) |
Let the visitor visit a Visitor_Butcher shop. | |
virtual void | VisitBaker (Visitor_Baker *shop) |
Let the visitor visit a Visitor_Baker shop. | |
virtual void | VisitVegetableGrocer (Visitor_VegetableGrocer *shop) |
Let the visitor visit a Visitor_VegetableGrocer shop. | |
virtual void | VisitCondimentGrocer (Visitor_CondimentGrocer *shop) |
Let the visitor visit a Visitor_CondimentGrocer shop. | |
virtual void | VisitPickleGrocer (Visitor_PickleGrocer *shop) |
Let the visitor visit a Visitor_PickleGrocer shop. | |
virtual void | VisitMaker (Visitor_Maker *shop) |
Let the visitor visit a Visitor_Maker shop. | |
Public Attributes | |
StringList | ItemsReceived |
List of items received from an order/pickup process. | |
std::string | ShopNameReceivedFrom |
Name of the shop that provided the item(s). | |
Protected Attributes | |
StringList | ItemsToOrder |
Items to be ordered from any shop that sells the item. | |
A visitor used for ordering items from various shops. The user starts with an instance of this class and a list of what they want to order.
A shop will used this visitor to order ingredients to make a requested item.
Definition at line 24 of file Visitor_Visitor_Class.h.
|
inline |
Constructor.
itemsToOrder | List of items to order. |
Definition at line 47 of file Visitor_Visitor_Class.h.
|
inlineoverridevirtual |
Let the visitor visit a Visitor_Baker shop.
shop | The specific baker shop being visited. |
Reimplemented from Visitor.
Definition at line 52 of file Visitor_Visitor_Class.h.
References OrderVisitor::ItemsReceived, OrderVisitor::ItemsToOrder, Visitor_Shop::Name(), Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and OrderVisitor::ShopNameReceivedFrom.
|
inlineoverridevirtual |
Let the visitor visit a Visitor_Butcher shop.
shop | The specific butcher shop being visited. |
Reimplemented from Visitor.
Definition at line 64 of file Visitor_Visitor_Class.h.
References OrderVisitor::ItemsReceived, OrderVisitor::ItemsToOrder, Visitor_Shop::Name(), Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and OrderVisitor::ShopNameReceivedFrom.
|
inlineoverridevirtual |
Let the visitor visit a Visitor_CondimentGrocer shop.
shop | The specific condiment grocer being visited. |
Reimplemented from Visitor.
Definition at line 88 of file Visitor_Visitor_Class.h.
References OrderVisitor::ItemsReceived, OrderVisitor::ItemsToOrder, Visitor_Shop::Name(), Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and OrderVisitor::ShopNameReceivedFrom.
|
inlineoverridevirtual |
Let the visitor visit a Visitor_Maker shop.
shop | The specific maker shop being visited. |
Reimplemented from Visitor.
Definition at line 112 of file Visitor_Visitor_Class.h.
References OrderVisitor::ItemsReceived, OrderVisitor::ItemsToOrder, Visitor_Shop::Name(), Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and OrderVisitor::ShopNameReceivedFrom.
|
inlineoverridevirtual |
Let the visitor visit a Visitor_PickleGrocer shop.
shop | The specific pickle grocer being visited. |
Reimplemented from Visitor.
Definition at line 76 of file Visitor_Visitor_Class.h.
References OrderVisitor::ItemsReceived, OrderVisitor::ItemsToOrder, Visitor_Shop::Name(), Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and OrderVisitor::ShopNameReceivedFrom.
|
inlineoverridevirtual |
Let the visitor visit a Visitor_Restaurant shop.
shop | The specific restaurant being visited. |
Reimplemented from Visitor.
Definition at line 124 of file Visitor_Visitor_Class.h.
References OrderVisitor::ItemsReceived, OrderVisitor::ItemsToOrder, Visitor_Shop::Name(), Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and OrderVisitor::ShopNameReceivedFrom.
|
inlineoverridevirtual |
Let the visitor visit a Visitor_VegetableGrocer shop.
shop | The specific vegetable grocer being visited. |
Reimplemented from Visitor.
Definition at line 100 of file Visitor_Visitor_Class.h.
References OrderVisitor::ItemsReceived, OrderVisitor::ItemsToOrder, Visitor_Shop::Name(), Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and OrderVisitor::ShopNameReceivedFrom.
StringList ItemsReceived |
List of items received from an order/pickup process.
Definition at line 36 of file Visitor_Visitor_Class.h.
Referenced by OrderVisitor::_HandleVisitor(), Visitor_Shop::PlaceOrder(), OrderVisitor::VisitBaker(), OrderVisitor::VisitButcher(), OrderVisitor::VisitCondimentGrocer(), OrderVisitor::VisitMaker(), OrderVisitor::VisitPickleGrocer(), OrderVisitor::VisitRestaurant(), and OrderVisitor::VisitVegetableGrocer().
|
protected |
Items to be ordered from any shop that sells the item.
Definition at line 30 of file Visitor_Visitor_Class.h.
Referenced by OrderVisitor::_HandleVisitor(), OrderVisitor::VisitBaker(), OrderVisitor::VisitButcher(), OrderVisitor::VisitCondimentGrocer(), OrderVisitor::VisitMaker(), OrderVisitor::VisitPickleGrocer(), OrderVisitor::VisitRestaurant(), and OrderVisitor::VisitVegetableGrocer().
std::string ShopNameReceivedFrom |
Name of the shop that provided the item(s).
Definition at line 41 of file Visitor_Visitor_Class.h.
Referenced by OrderVisitor::_HandleVisitor(), OrderVisitor::VisitBaker(), OrderVisitor::VisitButcher(), OrderVisitor::VisitCondimentGrocer(), OrderVisitor::VisitMaker(), OrderVisitor::VisitPickleGrocer(), OrderVisitor::VisitRestaurant(), and OrderVisitor::VisitVegetableGrocer().