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

Represents a shop in the village that can be visited. More...

#include <Visitor_Shop.h>

Collaboration diagram for Visitor_Shop:
Collaboration graph

Public Attributes

const char * Name
 Name of shop. Borrowed pointer.
 
const char * Address
 Address of shop. Borrowed pointer.
 
struct VillageVillage
 Village this shop is in. Borrowed pointer.
 
MapOfStrings IngredientsForItems
 Maps ingredient to list of items need for ingredient.
 
MapOfInt Inventory
 Maps ingredient to number of that ingredient in the shop.
 

Detailed Description

Represents a shop in the village that can be visited.

Definition at line 29 of file c/Visitor_Shop.h.

Member Data Documentation

◆ Address

const char* Address

Address of shop. Borrowed pointer.

Definition at line 32 of file c/Visitor_Shop.h.

Referenced by Shop_Create().

◆ IngredientsForItems

MapOfStrings IngredientsForItems

Maps ingredient to list of items need for ingredient.

Definition at line 34 of file c/Visitor_Shop.h.

Referenced by Shop_Create(), Shop_Destroy(), Shop_DoesShopSellItem(), Shop_PlaceOrder(), and Village_Load().

◆ Inventory

MapOfInt Inventory

Maps ingredient to number of that ingredient in the shop.

Definition at line 35 of file c/Visitor_Shop.h.

Referenced by AddItemToInventory(), IsItemInStock(), PickupOrder(), Shop_AddItemToInventory(), Shop_Create(), Shop_Destroy(), Shop_IsItemInStock(), and Shop_PickupOrder().

◆ Name

const char* Name

◆ Village

struct Village* Village

Village this shop is in. Borrowed pointer.

Definition at line 33 of file c/Visitor_Shop.h.

Referenced by Shop_Create(), and Shop_PlaceOrder().


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