Design Pattern Examples
Overview of object-oriented design patterns
Visitor_Village Class Reference

Represents a collection of shops that can be visited. More...

#include <Visitor_Village.h>

Collaboration diagram for Visitor_Village:
Collaboration graph

Public Member Functions

void LoadVillage ()
 Load the village.
 
void Accept (Visitor *visitor)
 

Public Attributes

std::string Name
 Name of this village.
 

Private Attributes

std::vector< Visitor_Shop::unique_ptr_tshops
 List of shops in this village.
 

Detailed Description

Represents a collection of shops that can be visited.

This class works as the container of all objects that can be visited. All visits start in this container.

Definition at line 24 of file cplusplus/Visitor_Village.h.

Member Function Documentation

◆ Accept()

void Accept ( Visitor visitor)

Definition at line 146 of file Visitor_Village.cpp.

References Visitor_Village::shops.

Referenced by Visitor_Shop::PlaceOrder().

◆ LoadVillage()

void LoadVillage ( )

Load the village.

Definition at line 13 of file Visitor_Village.cpp.

References Visitor_Village::Name, and Visitor_Village::shops.

Member Data Documentation

◆ Name

std::string Name

◆ shops

std::vector<Visitor_Shop::unique_ptr_t> shops
private

List of shops in this village.

Definition at line 30 of file cplusplus/Visitor_Village.h.

Referenced by Visitor_Village::Accept(), and Visitor_Village::LoadVillage().


The documentation for this class was generated from the following files: