Design Pattern Examples
Overview of object-oriented design patterns
visitor_class.py
Go to the documentation of this file.
6
7
8
18class Visitor:
19
23 def VisitRestaurant(shop) -> None:
24 pass
25
26
30 def VisitButcher(shop) -> None:
31 pass
32
33
37 def VisitBaker(shop) -> None:
38 pass
39
40
44 def VisitVegetableGrocer(shop) -> None:
45 pass
46
47
51 def VisitCondimentGrocer(shop) -> None:
52 pass
53
54
58 def VisitPickleGrocer(shop) -> None:
59 pass
60
61
65 def VisitMaker(shop) -> None:
66 pass
All visitors must implement this base class and then override one or more of the VisitXXX() methods,...
None VisitPickleGrocer(shop)
Let the visitor visit a Visitor_PickleGrocer shop.
None VisitButcher(shop)
Let the visitor visit a Visitor_Butcher shop.
None VisitVegetableGrocer(shop)
Let the visitor visit a Visitor_VegetableGrocer shop.
None VisitMaker(shop)
Let the visitor visit a Visitor_Maker shop.
None VisitRestaurant(shop)
Let the visitor visit a Visitor_Restaurant shop.
None VisitCondimentGrocer(shop)
Let the visitor visit a Visitor_CondimentGrocer shop.
None VisitBaker(shop)
Let the visitor visit a Visitor_Baker shop.