File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ @startuml
2+ skin rose
3+
4+ interface Visitor {
5+ + void visit (d : Dot )
6+ + void visit (c : Circle )
7+ + void visit (r : Rectangle )
8+ }
9+
10+ class XMLExportVisitor {
11+ + void visit(d: Dot)
12+ + void visit(c: Circle)
13+ + void visit(r: Rectangle)
14+ }
15+
16+ interface Shape {
17+ + void draw ()
18+ + void move (x : int , y : int )
19+ + void accept (visitor : Visitor )
20+ }
21+
22+ class Dot {
23+ ...
24+ + void draw ()
25+ + void move(x: int, y: int)
26+ + void accept(visitor: Visitor)
27+ }
28+
29+ class Circle {
30+ ...
31+ + void draw ()
32+ + void move(x: int, y: int)
33+ + void accept(visitor: Visitor)
34+ }
35+
36+ class Rectangle {
37+ ...
38+ + void draw ()
39+ + void move(x: int, y: int)
40+ + void accept(visitor: Visitor)
41+ }
42+
43+ Visitor <|..right .. XMLExportVisitor
44+ Shape <|.. Dot
45+ Shape <|.. Circle
46+ Shape <|.. Rectangle
47+
48+ Visitor <..right .. Shape
49+ Visitor ..> Dot
50+ Visitor ..> Circle
51+ Visitor ..> Rectangle
52+
53+ XMLExportVisitor <.. client
54+ Shape <.. client
55+ @enduml
You can’t perform that action at this time.
0 commit comments