Visitor
From CSSEMediaWiki
Revision as of 12:21, 30 July 2008 by Tureiti Keith (Talk | contribs)
Introduction
The Visitor is a behavioural pattern. It allows the designer to define new operations on an object structure and its elements, without modifying the object structure itself.
Description
The Visitor describes three distinct components:
- Object Structure: Provides a visitor with access to its elements
- Element: Accepts visits
- Visitor: Accesses an element to perform operations
Figure 1 graphically describes these Visitor pattern interactions.