On Tue, Feb 17, 2009 at 10:02 AM, Rickard Öberg <[email protected]> wrote:
> Niclas Hedhman wrote:
>> On Tue, Feb 17, 2009 at 1:14 AM, Tonny Kohar <[email protected]> wrote:
>>
>>> Yes each implementation certainly have different needs. Just
>>> suggestion, do you think is a good idea to provide default (traverse
>>> all in structure order or type order) as part of library ?
>>
>> The only other (beside NoOp) implementation that I can think of that
>> is reasonably common, would be that the base class keep track of
>> 'current position' of the 'walker'.
>> Perhaps that is low overhead enough to be part of the standard adapter.
>> Rickard?
>
> This is sort of similar to how the Bind method works, as it gets not a
> reference to the object being visited, but to a tracker of position
> (Resolution). The same could be done here I supposed.
Well, we should expose Resolution, and I suggest basically to do a
public void visit( CompositeDescriptor compositeDescriptor )
{
currentComposite = compositeDescriptor;
}
for each method in the base class (DescriptorVisitor).
Cheers
Niclas
--
http://www.qi4j.org - New Energy for Java
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev