$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [flyweight] key value with objects not constructible from a key
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-11-12 21:25:34
Michael Marcin wrote:
> It would go to the factory's construct method which might look like:
> 
> void TextureFactory::construct( void* address, const std::string& 
> filename )
> {
>    // complex work involving lots of 3rd party libraries
>    // happens here
>    GLuint glTextureName = LoadImage( filename );
> 
>    // texture stays simple
>    new(address) Texture( glTextureName, filename );
> }
Rather than doing this, it might be more elegant to return a factory 
function, such as in_place or functional/factory.