[gme-users] RE: [udm-users] RE: About the generated visitor

Vijayaraghavan Kalyanapasupathy vijayaraghavan.k at isis.vanderbilt.edu
Mon Apr 5 14:29:08 CDT 2004


Hi Group,

Page 159 (in the manual) or Page 161 of the file in the "GME User's Guide and Manual" updated version available at http:://www.isis.vanderbilt.edu/
under the link for Courses/Model Integrated Computing,

Observe the accept method for BON::Object whose signature is replicated below:

void accept( BON::Visitor* pVisitor, bool bChildrenFirst = false );

As far as I recall, the second argument will force children to be visited first if it is true. I think this translates to bottom up traversal. Of course I may be wrong, since I am recalling (maybe incorrectly) a conversation I had with Tamas about this.

Hope this helps,

thanx,
vijai.
 
> > I guess it would be more complete and useful to implement the
> > traversal code as well. I guess we have to wait for Adi'
> > input as well. Also, if you have observed BON 2.0 has this
> > facility of visiting bottom-up or top-down (i.e all leaves
> > first and then nodes, or nodes first and children next). I
> > was trying to mimic this in my code with the use of the
> > "vOrder" argument.
> >
> 
> Lacking documentation (and proximity) for BON2.0, can you give me more
> details on how to do the topdown/bottom up traversal schemes?
> Specifically,
> which calls to make? I 'found' the bottom-up by accident one day, after I
> had already written my own top-down version. I have decided to cross-post,
> since this seems interesting to UDM's traversal discussion as well as
> GME's
> thought process.
> 
> Cheers,
> 
> Jon


More information about the gme-users mailing list