Top "Visitor" questions

The Visitor design pattern is a way of separating an algorithm from an object structure on which it operates.

Implementing the visitor pattern using C++ Templates

I've been trying to reduce the amount of boilerplate in my code, by using C++ Templates to implement the visitor …

c++ templates visitor
Translator Pattern

In a previous job, my manager suggested use of a Translator pattern for converting data from a DataTable to objects. …

oop design-patterns visitor
C++ template to cover const and non-const method

I have a problem with duplication of identical code for const and non-const versions. I can illustrate the problem with …

c++ templates visitor
need a virtual template member workaround

I need to write a program implementing the visitor design pattern. The problem is that the base visitor class is …

c++ templates virtual visitor
Visitor pattern in python

here is a simplified implementation of the visitor pattern in C++. Ist it possible to implement something like this in …

python visitor
Difference between decorator design pattern and visitor design pattern

I believe to understand the intent of Decorator and Visitor design pattern. Though i can list following differences Decorator works …

design-patterns decorator visitor
Replace switch-case with polymorphism

I know there are similar questions already, but looking at them I still have some doubts about how I should …

java design-patterns polymorphism visitor
best way to do variant visitation with lambdas

I want to inline visitation of variant types with lambdas. At the moment i have the following code: struct Foo { …

c++ c++11 lambda visitor boost-variant
Java visitor pattern instead of instanceof switch

In this question it is said I can use visitor pattern instead of a bunch of instanceofs. Jmg said "If …

java visitor
Using the visitor pattern with generics in C#

I want to know whether the below is an acceptable use of the visitor pattern. I feel a little uncomfortable …

c# design-patterns visitor