Visitor
From CSSEMediaWiki
(Difference between revisions)
(New page: ==Introduction== The Visitor is a behavioural pattern. It allows the designer to define new operations on a class and its members, without modifying the class itse...) |
(→Introduction) |
||
Line 2: | Line 2: | ||
The Visitor is a [[Behavioural pattern|behavioural pattern]]. It allows the designer to define new operations on a class and its members, without modifying the class itself. | The Visitor is a [[Behavioural pattern|behavioural pattern]]. It allows the designer to define new operations on a class and its members, without modifying the class itself. | ||
+ | |||
+ | ==Description== | ||
+ | |||
+ | The Visitor describes three major roles: | ||
+ | *Object Structure: Provides a visitor with access to its elements | ||
+ | *Element: Accepts visits | ||
+ | *Visitor: Accesses an element to perform operations |
Revision as of 06:26, 30 July 2008
Introduction
The Visitor is a behavioural pattern. It allows the designer to define new operations on a class and its members, without modifying the class itself.
Description
The Visitor describes three major roles:
- Object Structure: Provides a visitor with access to its elements
- Element: Accepts visits
- Visitor: Accesses an element to perform operations