"The (B)Leading Edge"
Yet Another Visitor Pattern
ęC++ Report (March 1998)

Abstract
This column begins a series on patterns, more specifically, the Visitor pattern. This first installment discusses the standard Visitor pattern as defined in the Gang of Four book (Design Patterns), and why Visitor is such a useful pattern. It then looks at one of the problems with Visitor: the circular dependency that exists between the visitor class and all the nodes that can be visited. An alternative Visitor pattern -- named Indirect Visitor -- is presented which addresses the circular dependency issue.