From: JoaquÃn M LÃ³pezMuÃ±oz (joaquin_at_[hidden])
Date: 2008-02-04 15:44:57
Michael Fawcett <michael.fawcett <at> gmail.com> writes:
> On Feb 4, 2008 12:16 PM, JoaquÃn MÂª LÃ³pez MuÃ±oz <joaquin <at> tid.es> wrote:
> > Good to know there's a potential for the keyed variant. Would you support
> > then the provision of regular flyweight and also keyed_flyweight as exposed
> > in my prior post?
> I support the notion of being able to lookup existing instances by
> key. However you implement it, I hope it will have an elegant syntax,
> and an extremely efficient implementation. Remember that this pattern
> is used often in games and 3D graphics, where extra copies are not an
> option, regardless of how pretty it makes the code look.
Besides regular flyweight and keyed_flyweight, there's a third
potential variant, namely tha in which the flyweight is
keyed but the key is not stored separately and can be obtained
from T. I'd like to ask you: in your particular use cases, do
your mesh classes store (apart from their data) the name of
the file the data was brought from, i.e. can you obtain
K from T? I wonder whether this third variant is worth implementing
after all, given ther difficulties STL containers have at
comparing elements with external keys.
> I intended on doing a review but regrettably don't have time to review
> this library. Good luck! Your libraries are high quality and I enjoy
> using them, so I hope Flyweight gets accepted.
Thanks for your compliments. The review has brought forward a
good number of issues. Regardless of what the review outcome is,
I'll have to rethink much of what I've written.
JoaquÃn M LÃ³pez MuÃ±oz
TelefÃ³nica, InvestigaciÃ³n y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk