学习高校课程-软件设计模式-访客模式(lec13)

Visitor: Problem

Example: exporting the graph into XML format
示例:将图表导出为 XML 格式

Visitor: Solution

Place the new behavior into a separate class called visitor
The original object passed to the visitor’s method as an argument

posted @ 2024-12-24 18:27  Mephostopheles  阅读(1)  评论(0编辑  收藏  举报