От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 14.10.04 10:49 | ||
Оценка: | 10 (3) |
The composite is a very powerful pattern, allowing a polymorphic tree of objects to know about its structure. In order for this pattern to be successful, it is usual to implement a variety of iterators over the hierarchy. This article deals with the problem of typed iteration. Developing work from a previous article, I have constructed a set of tree iterators that only return children of a particular type.