The 'Gang of Four' Companion:

Visitor Design Pattern

Formal specification of design patterns in LePUS3 and Class-Z

Print this document

This page is part of the The 'Gang of Four' Companion dedicated to the formal specification in LePUS3 and Class-Z of patterns from the 'Gang of Four' catalogue [Gamma et al 1995].



The Visitor design motif

The informal description: Excerpts from [Gamma et al. 1995] (adapted for this purpose):

Intent: 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.

Structure: Original OMT diagram converted to UML (Why and How?):

Visitor in UML



Formal specification

See also:

Visitor in LePUS3
Visitor in LePUS3 (legend)
Visitor in Class-Z (legend)