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...
Public Member Functions | |
OrderVisitor (string[] itemsToOrder) | |
Constructor. | |
override void | VisitBaker (Visitor_Baker shop) |
Let the visitor visit a Visitor_Baker shop. | |
override void | VisitButcher (Visitor_Butcher shop) |
Let the visitor visit a Visitor_Butcher shop. | |
override void | VisitPickleGrocer (Visitor_PickleGrocer shop) |
Let the visitor visit a Visitor_PickleGrocer shop. | |
override void | VisitCondimentGrocer (Visitor_CondimentGrocer shop) |
Let the visitor visit a Visitor_CondimentGrocer shop. | |
override void | VisitVegetableGrocer (Visitor_VegetableGrocer shop) |
Let the visitor visit a Visitor_VegetableGrocer shop. | |
override void | VisitMaker (Visitor_Maker shop) |
Let the visitor visit a Visitor_Maker shop. | |
override void | VisitRestaurant (Visitor_Restaurant shop) |
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. | |
Properties | |
string[] | ItemsToOrder [get, set] |
Items to be ordered from any shop that sells the item. | |
List< string > | ItemsReceived [get, set] |
List of items received from an order/pickup process. | |
string | ShopNameReceivedFrom [get, set] |
Name of the shop that provided the item(s). | |
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 200 of file Visitor_Visitor_Class.cs.
|
inline |
Constructor.
itemsToOrder | List of items to order. |
Definition at line 224 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, and OrderVisitor.ShopNameReceivedFrom.
|
inlinevirtual |
Let the visitor visit a Visitor_Baker shop.
shop | The specific baker shop being visited. |
Reimplemented from Visitor.
Definition at line 231 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, Visitor_Shop.Name, Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and OrderVisitor.ShopNameReceivedFrom.
|
inlinevirtual |
Let the visitor visit a Visitor_Butcher shop.
shop | The specific butcher shop being visited. |
Reimplemented from Visitor.
Definition at line 240 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, Visitor_Shop.Name, Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and OrderVisitor.ShopNameReceivedFrom.
|
inlinevirtual |
Let the visitor visit a Visitor_CondimentGrocer shop.
shop | The specific condiment grocer being visited. |
Reimplemented from Visitor.
Definition at line 258 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, Visitor_Shop.Name, Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and OrderVisitor.ShopNameReceivedFrom.
|
inlinevirtual |
Let the visitor visit a Visitor_Maker shop.
shop | The specific maker shop being visited. |
Reimplemented from Visitor.
Definition at line 276 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, Visitor_Shop.Name, Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and OrderVisitor.ShopNameReceivedFrom.
|
inlinevirtual |
Let the visitor visit a Visitor_PickleGrocer shop.
shop | The specific pickle grocer being visited. |
Reimplemented from Visitor.
Definition at line 249 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, Visitor_Shop.Name, Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and OrderVisitor.ShopNameReceivedFrom.
|
inlinevirtual |
Let the visitor visit a Visitor_Restaurant shop.
shop | The specific restaurant being visited. |
Reimplemented from Visitor.
Definition at line 285 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, Visitor_Shop.Name, Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and OrderVisitor.ShopNameReceivedFrom.
|
inlinevirtual |
Let the visitor visit a Visitor_VegetableGrocer shop.
shop | The specific vegetable grocer being visited. |
Reimplemented from Visitor.
Definition at line 267 of file Visitor_Visitor_Class.cs.
References OrderVisitor.ItemsReceived, OrderVisitor.ItemsToOrder, Visitor_Shop.Name, Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and OrderVisitor.ShopNameReceivedFrom.
|
getset |
List of items received from an order/pickup process.
Definition at line 211 of file Visitor_Visitor_Class.cs.
Referenced by OrderVisitor._HandleVisitor(), OrderVisitor.OrderVisitor(), Visitor_Shop.PlaceOrder(), Visitor_Exercise.Run(), OrderVisitor.VisitBaker(), OrderVisitor.VisitButcher(), OrderVisitor.VisitCondimentGrocer(), OrderVisitor.VisitMaker(), OrderVisitor.VisitPickleGrocer(), OrderVisitor.VisitRestaurant(), and OrderVisitor.VisitVegetableGrocer().
|
getset |
Items to be ordered from any shop that sells the item.
Definition at line 205 of file Visitor_Visitor_Class.cs.
Referenced by OrderVisitor._HandleVisitor(), OrderVisitor.OrderVisitor(), OrderVisitor.VisitBaker(), OrderVisitor.VisitButcher(), OrderVisitor.VisitCondimentGrocer(), OrderVisitor.VisitMaker(), OrderVisitor.VisitPickleGrocer(), OrderVisitor.VisitRestaurant(), and OrderVisitor.VisitVegetableGrocer().
|
getset |
Name of the shop that provided the item(s).
Definition at line 217 of file Visitor_Visitor_Class.cs.
Referenced by OrderVisitor._HandleVisitor(), OrderVisitor.OrderVisitor(), Visitor_Exercise.Run(), OrderVisitor.VisitBaker(), OrderVisitor.VisitButcher(), OrderVisitor.VisitCondimentGrocer(), OrderVisitor.VisitMaker(), OrderVisitor.VisitPickleGrocer(), OrderVisitor.VisitRestaurant(), and OrderVisitor.VisitVegetableGrocer().