Boost logo

Boost :

From: Corrado Zoccolo (czoccolo_at_[hidden])
Date: 2007-11-19 11:22:42


Hi Fernando,
On Nov 18, 2007 7:55 PM, Fernando Cacciola <fernando_cacciola_at_[hidden]>
wrote:
> Having "out_of_place" inherit from "in_place" is still odd IMO, so I
prefer
> having a common "typed_factory_base" holding the parameters list from
which
> the two versions derive (these dervied class just define the apply()).
Yes, it was a quick hack to see if it could work.

After further thoughts along those lines:
On Nov 18, 2007 7:55 PM, Fernando Cacciola <fernando_cacciola_at_[hidden]>
wrote:

> Furthermore, this is off the top of my head, but I was thinking when I
> first
> responded you that the parameter list could be stored within an aggregated
> struct to make it easier to convert one kind of factory into another.
>

I think the best would be to have a reusable "(typed) argument list"
structure, around which the factories can be built as free functions (or we
could have a generic apply taking the argument list and a functor, so every
factory will just become a different functor).
Moreover, once the argument list is decoupled from the factory, it could be
interoperable with fusion, enabling more freedom in how they are used.

Corrado

-- 
__________________________________________________________________________
dott. Corrado Zoccolo                          mailto:zoccolo_at_[hidden]
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------
The self-confidence of a warrior is not the self-confidence of the average
man. The average man seeks certainty in the eyes of the onlooker and calls
that self-confidence. The warrior seeks impeccability in his own eyes and
calls that humbleness.
                              Tales of Power - C. Castaneda

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk