Design Pattern Examples
Overview of object-oriented design patterns
OrderVisitor Struct Reference

Represents 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_OrderVisitor.h>

Collaboration diagram for OrderVisitor:
Collaboration graph

Public Attributes

ConstStringList ItemsToOrder
 Items to be ordered from any shop that sells the item.
 
ConstStringList ItemsReceived
 List of items received from an order/pickup process.
 
const char * ShopNameReceivedFrom
 Name of the shop that provided the item(s). Borrowed pointer.
 

Detailed Description

Represents 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.

Later, a shop will used this visitor to order ingredients to make a requested item.

Definition at line 20 of file Visitor_OrderVisitor.h.

Member Data Documentation

◆ ItemsReceived

ConstStringList ItemsReceived

List of items received from an order/pickup process.

Definition at line 30 of file Visitor_OrderVisitor.h.

Referenced by _HandleVisitor(), OrderVisitor_Clear(), OrderVisitor_Initialize(), OrderVisitor_VisitShop(), Shop_PlaceOrder(), and Visitor_Exercise().

◆ ItemsToOrder

ConstStringList ItemsToOrder

Items to be ordered from any shop that sells the item.

Definition at line 25 of file Visitor_OrderVisitor.h.

Referenced by _HandleVisitor(), OrderVisitor_Clear(), OrderVisitor_Initialize(), OrderVisitor_VisitShop(), Shop_PlaceOrder(), and Visitor_Exercise().

◆ ShopNameReceivedFrom

const char* ShopNameReceivedFrom

Name of the shop that provided the item(s). Borrowed pointer.

Definition at line 35 of file Visitor_OrderVisitor.h.

Referenced by _HandleVisitor(), OrderVisitor_Initialize(), OrderVisitor_VisitShop(), and Visitor_Exercise().


The documentation for this struct was generated from the following file: