Difference between revisions of "Visitor"

From Open Pattern Repository for Online Learning Systems
Jump to navigation Jump to search
(Created patlet for pattern)
 
(Edited patlet)
Line 14: Line 14:
}}
}}


Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.<ref name="Gamma"/><ref name="Visitor"/>
Represent an operation to be performed on the elements of an object structure. {{Patternlink|Visitor}} lets you define a new operation without changing the classes of the elements on which it operates.<ref name="Gamma"/><ref name="Visitor"/>





Revision as of 11:39, 4 October 2016


Visitor
Contributors
Last modification October 4, 2016
Source Gamma, Helm, Johnson & Vlissides (1995)[1], Visitor Pattern (2016)[2]
Pattern formats OPR Alexandrian
Usability
Learning domain
Stakeholders

Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.[1][2]


Context

Problem

Forces

Solution

Consequences

Benefits

Liabilities

Evidence

Literature

Discussion

Data

Applied evaluation

Related patterns

Example

References

  1. 1.0 1.1 Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1995). Design Patterns: elements of reusable object-oriented software. Reading, Massachusetts: Addison-Wesley. ISBN 0-201-63361-2.
  2. 2.0 2.1 Visitor Pattern. (2016). Retrieved October 4, 2016 from http://c2.com/cgi/wiki?VisitorPattern.