[C++-sig] boost::any
Christophe de Vienne
cdevienne at alphacent.com
Wed Feb 22 17:34:29 CET 2006
Hi,
First I want to say how impressed I am by the boost::python library.
Each time I get one more think to work with python in my program, I just
think : 'Wao... Easy, Powerfull and Elegant... I must dreaming :-)'
But (there is a but), despite the amount of documentation I searched
through, I couldn't find some hint about using boost::any along with
boost::python.
My problem is the following :
I am using in a very few places some std::vector<boost::any>, and I need to
pass them to a python function which should return another vector of the
same type. The function is a virtual one.
I see two (three ?) possibilities :
1st - register a converter to boost::any which reuse the registration system
to make the job (is it doable ? realistic ? stupid ?)
2nd - Since I use a known set of types, hand-code a converter. In that case,
how should I define the functions in my class ? Where to start ?
3rd - Modify my program architecture so there is no need for those ugly
vectors...
I am a bit lost at this point, so a few hints would help me a lot to make a
decision about this.
Thanks very much,
Christophe
More information about the Cplusplus-sig
mailing list