[C++-sig] Extract
Sean Ross-Ross
srossross at gmail.com
Wed May 30 18:26:09 CEST 2007
I have a templated class PatameterList that mimics a c++ map or a
python dict.
it has a method
template<class T>
void set( string name, T item )
how can I add a method in that will extract any c++ class from python
and put it into the PatameterList
I was thinking along the lines of
adding a method
void my_set( PatameterList const& self,string, name,
boost::python::object o)
{
self.set(name , extract< whatever > ( o ) );
}
...
class_< PatameterList > ( ...
...
.def( "set" , &my_set )
...
where I don't know how to implement the "whatever" arg.
~Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070530/875cd0c2/attachment.htm>
More information about the Cplusplus-sig
mailing list