Using the One Pass Visitor
- Inherit from TOP_DOWN_VISITOR
- Redefine each of the visit_<metaclass> call that you want to add additional processing.
- Define the body of what you want to do for each of the visit_<metaclass> call.
- Add a call back to the ancestor ’s visit_<metaclass> using the Precursor construct at the end.
visit_uml_class(node : UML_CLASS) is
-- then, call ancestor ’s method to complete traversal