Files Classes Functions Hierarchy
#include <visitor.h>
Public Member Functions | |
| virtual void | visit (ElementA &a) const |
| This functional operates on data ElementA. | |
| virtual void | visit (ElementB &b) const |
| This functional operates on data ElementB. | |
| virtual | ~Visitor () |
Through inheritance, derive functions from Visitor. For this pattern variations, these function forward work to templated functions in the data tree. Therefore there is not a separation between function and data as usually characterised in the visitor pattern.
ie implementing a new function adds a functional Visitor to the function tree, and each data member needs to implement a templated function for the new functional visitor function.
Definition at line 20 of file visitor.h.
| virtual void Visitor::visit | ( | ElementB & | b | ) | const [inline, virtual] |
This functional operates on data ElementB.
Reimplemented in visitorPrint< T >, and visitorPrint2< T >.
Definition at line 27 of file visitor.h.
| virtual void Visitor::visit | ( | ElementA & | a | ) | const [inline, virtual] |
This functional operates on data ElementA.
Reimplemented in visitorPrint< T >, and visitorPrint2< T >.
Definition at line 25 of file visitor.h.
Referenced by ElementB::accept(), and ElementA::accept().
1.5.8