Design Pattern Examples
Overview of object-oriented design patterns
cplusplus/Visitor_Village.h
Go to the documentation of this file.
1
5
6#pragma once
7#ifndef __VISITOR_VILLAGE_H__
8#define __VISITOR_VILLAGE_H__
9
10#include <memory>
11#include <string>
12#include <vector>
13
14#include "Visitor_Shop.h"
15
17{
25 {
26 private:
30 std::vector<Visitor_Shop::unique_ptr_t> shops;
31
32 public:
36 std::string Name;
37
41 void LoadVillage();
42
43 void Accept(Visitor* visitor);
44
45 };
46
47} // end namespace
48
49#endif // __VISITOR_VILLAGE_H__
50
Represents a collection of shops that can be visited.
std::vector< Visitor_Shop::unique_ptr_t > shops
List of shops in this village.
All visitors must implement this base class and then override one or more of the VisitXXX() methods,...
Declaration of the Visitor_Shop base class used in the Visitor Pattern.
The namespace containing all Design Pattern Examples implemented in C++.