Design Pattern Examples
Overview of object-oriented design patterns
Visitor_OrderVisitor.h
Go to the documentation of this file.
1
6
7#pragma once
8#ifndef __VISITOR_ORDERVISITOR_H__
9#define __VISITOR_ORDERVISITOR_H__
10
11#include "Visitor_Shop.h"
12
20typedef struct OrderVisitor
21{
26
31
37
38//-----------------------------------------------------------------------------
39
52
58void OrderVisitor_Clear(OrderVisitor* visitor);
59
73
74#endif // __VISITOR_ORDERVISITOR_H__
75
bool OrderVisitor_VisitShop(OrderVisitor *order, Visitor_Shop *shop)
Represents a visit to the specified Visitor_Shop with the specified order.
void OrderVisitor_Initialize(OrderVisitor *visitor)
Initialize the specified OrderVisitor object.
void OrderVisitor_Clear(OrderVisitor *visitor)
Clear the specified OrderVisitor object, freeing up any memory that it was using. The resulting objec...
Declaration of the Visitor_Shop base class used in the Visitor Pattern.
Represents a list of pointers to zero-terminated strings that are to remain constant and never delete...
Represents a visitor used for ordering items from various shops. The user starts with an instance of ...
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.
Represents a shop in the village that can be visited.