Tag Archives: visitor

The Art of the Visitor Pattern (3)

In the previous posts in this series I looked at the basic Visitor design pattern and a couple of variations, like eliminating recursion to make the visitor interruptable. As promised, this time I will make our visitor re-entrant. Here’s what … Continue reading

Posted in Code | Tagged , | Leave a comment

The Art of the Visitor Pattern (2)

In my previous post, we took a look at the basic Visitor design pattern, and a couple of simple variations. I now continue with a more ambitious variation. This is where the fun begins. Variation 3: Eliminate recursion Suppose we … Continue reading

Posted in Code | Tagged , | Leave a comment

The Art of the Visitor Pattern (1)

The visitor design pattern is one of those relatively simple patterns that you can use in many situations. Some situations are more complex than others, though, and may require some modifications. I will first present the basic pattern, and then … Continue reading

Posted in Code | Tagged , | 2 Comments