|
Boost : |
From: Jason Hise (chaos_at_[hidden])
Date: 2005-01-22 19:36:00
Dave Handley wrote:
> Following on from a post I made about a week ago regarding a
> templatised composite, a version of an acyclic visitor, and a version
> of this visitor designed to visit composite trees, I have uploaded
> these files to the boost sandbox in a file called
> composite_visitor.zip. I have included some basic instructions on how
> to use the classes. I would appreciate some feedback on whether there
> would be any interest in submitting these for inclusion in Boost.
> Also I would be interested in any thoughts regarding potential
> improvements to the templates.
>
> Thanks
>
> Dave Handley
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
I have no familiarity with these patterns, so my range of suggestions is
fairly limited. However, I did notice one way that you might be able to
make the composite more generic. Your composite library currently
forces the client to set up the hierarchy with raw pointers. Would it
be reasonable to ask that it allow smart pointers as well? It would
seem that this would be as easy as making the template parameter the
pointer type instead of the object type, as the plain object type
doesn't (appear to) be used anywhere.
-Jason
(btw, have you tried out my singleton longevity lifetime policy yet? ;) )
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk