加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oop – 访客设计模式中的循环依赖

发布时间:2020-12-13 20:45:06 所属栏目:百科 来源:网络整理
导读:有没有办法实现访客设计模式没有循环依赖?我的意思是访客需要一个访问对象.并且访问对象需要访问者接受.最终两者都相互依赖. 再找到它!查看 Acyclic Visitor: 引用: Allow new functions to be added to existing class hierarchies without affecting t
有没有办法实现访客设计模式没有循环依赖?我的意思是访客需要一个访问对象.并且访问对象需要访问者接受.最终两者都相互依赖.
再找到它!查看 Acyclic Visitor:

引用:

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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读