类的配对层次结构 [英] an structure of paired hierarchies of classes
本文介绍了类的配对层次结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
它的代码看起来像以及可能值得阅读的 Lambda the Ultimate 。
is there a design pattern who's structure looks like this. B owns a reference to A, and also do some work using A. and further more, each sub class in hierarchy B relay on a sub class in hierarchy A to do its work. its code looks like https://codereview.stackexchange.com/questions/12412/two-related-hierarchies-of-classes
解决方案
This is a parallel inheritance hierarchy, and more commonly viewed as an anti-pattern.
There's some discussion of it on Ward's Wiki and at Lambda the Ultimate that might be worth reading.
这篇关于类的配对层次结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文