Re: [Fresco-devel] Bogus traversals (and patch)

Nick Lewycky <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
Stefan Seefeld wrote:
> Nick Lewycky wrote:
> 
>> I ask the graphic to traverse itself, then its children by calling 
>> A->traverse(t);
>>
>> My suggested implementation of A->traverse(t) is {t->visit(_this); 
>> MonoGraphic::traverse(t); }
> 
> yeah, that would work equally well (beside the fact that you have to care
> for the cleanup in the Traversal). Why do you think this is better
> than calling MonoGraphic::traverse inside 'draw' and 'pick' ?

Because I'm trying to write a Traversal that visits all the Graphics but 
isn't interested in either picking them nor rendering them. I shouldn't 
need to use GraphicIterators to do this.

Secondly, I think it's better to care for cleanup in the Traversal 
because I don't trust an arbitrary Graphic to do it for us. (At the 
moment there are still plenty of ways for a client to crash the server, 
but I think this is a step in the right direction.)

> Do you feel it is more clean to keep the actual visitor stuff separate
> from the traversal (which reminds a bit of the cursor pattern...) ?

Yes.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.