visitor pattern

Visitor design pattern is a behavioural design pattern. It is used to perform an operation on a group of similar kind of objects. With the help of visitor pattern, we can move the operation from the objects to another class.
The visitor pattern consists of two parts:
* a method called Visit() which is implemented by the visitor and is called for every element in the data structure
* every visitable classes providing Accept() methods that accept a visitor