
12 Nov
2008
12 Nov
'08
9:32 p.m.
On Wed, Nov 12, 2008 at 16:09, Joaquin M Lopez Munoz <joaquin@tid.es> wrote:
If an equivalent flyweight already exists then there is no problem, fw will be assigned the same texture object, this is how Boost.Flyweight currently works. Now, imagine that no equivalent texture exists, and yet you can't construct a texture object from "wood.texture" alone. How would you have then the above statement behave?
Perhaps there is no constructor for a texture that takes the key, but instead there's some load_texture function that can construct a texture from the key? I didn't notice an easy way to include the opposite of an extractor that can go from key to value, so it seems like doing that would require wrapping a factory.