Design Pattern Examples
Overview of object-oriented design patterns
visitor_element_classes.py
Go to the documentation of this file.
5
6from .visitor_visitor_shop import Visitor_Shop
7
8
9
11
12
16 def Accept(self, visitor) -> None:
17 if visitor and hasattr(visitor, "VisitRestaurant"):
18 visitor.VisitRestaurant(self)
19
20
21#-------------------------------------------------------------------------
22#-------------------------------------------------------------------------
23
24
25
27
28
32 def Accept(self, visitor) -> None:
33 if visitor and hasattr(visitor, "VisitButcher"):
34 visitor.VisitButcher(self)
35
36
37#-------------------------------------------------------------------------
38#-------------------------------------------------------------------------
39
40
41
43
44
48 def Accept(self, visitor) -> None:
49 if visitor and hasattr(visitor, "VisitBaker"):
50 visitor.VisitBaker(self)
51
52
53#-------------------------------------------------------------------------
54#-------------------------------------------------------------------------
55
56
57
59
60
64 def Accept(self, visitor) -> None:
65 if visitor and hasattr(visitor, "VisitVegetableGrocer"):
66 visitor.VisitVegetableGrocer(self)
67
68
69#-------------------------------------------------------------------------
70#-------------------------------------------------------------------------
71
72
73
75
76
80 def Accept(self, visitor) -> None:
81 if visitor and hasattr(visitor, "VisitCondimentGrocer"):
82 visitor.VisitCondimentGrocer(self)
83
84
85#-------------------------------------------------------------------------
86#-------------------------------------------------------------------------
87
88
89
91
92
96 def Accept(self, visitor) -> None:
97 if visitor and hasattr(visitor, "VisitPickleGrocer"):
98 visitor.VisitPickleGrocer(self)
99
100
101#-------------------------------------------------------------------------
102#-------------------------------------------------------------------------
103
104
105
107
108
112 def Accept(self, visitor) -> None:
113 if visitor and hasattr(visitor, "VisitMaker"):
114 visitor.VisitMaker(self)