You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating the troublesome dependency cycles that are inherent to the GOF VISITOR Pattern.
16
+
17
+
## Applicability
18
+
This pattern can be used:
19
+
* When you need to add a new function to an existing hierarchy without the need to alter or affect that hierarchy.
20
+
* When there are functions that operate upon a hierarchy, but which do not belong in the hierarchy itself. e.g. the ConfigureForDOS / ConfigureForUnix / ConfigureForX issue.
21
+
* When you need to perform very different operations on an object depending upon its type.
22
+
* When the visited class hierarchy will be frequently extended with new derivatives of the Element class.
23
+
* When the recompilation, relinking, retesting or redistribution of the derivatives of Element is very expensive.
0 commit comments