别忘了多态只能通过成员函数调用来实现,所以如果你想实现双重分派(double dispatching),就必须得有两次成员函数调用:第一次调用决定第一个未知类型,第二次调用决定第二个未知类型。
基于30个网页-相关网页
Visitor形式的几个关键Visitor形式穿越所谓双重发放(double dispatch)来告终在不改动Element类层次构造的前提下,在运行时透明地为类层次构造上的各个类动态增加新的垄断。
基于12个网页-相关网页
以上来源于: WordNet
Set up the new screen using Double dispatch.
使用双重分发设置新屏幕。
I got an unexpected demonstration of the double dispatch pattern in real life the other day.
几天前在实际生活中我意外地得到了双重分发模式的一个演示。
We can use a pattern called Double Dispatch to pull out the variation into the subclasses in such a way that we don't break existing interface contracts.
我们可以使用称为双重分发的模式将变化推入子类中,通过这种方式,我们不需要破坏现有的接口定义。
应用推荐