[C++-sig] Wrapping multiple class_<T> objects
David Abrahams
dave at boost-consulting.com
Wed Nov 20 14:28:13 CET 2002
Peter Bienstman <Peter.Bienstman at rug.ac.be> writes:
> On Wednesday 20 November 2002 14:02, David Abrahams wrote:
>
>> There are lots of ways to write this so you don't instantiate the same
>> class_<> twice. One is:
>>
>> object slabwallmixed
>> = class_<SlabWallMixed, bases<SlabWall> >
>> ("SlabWallMixed", init<const Complex&, const Complex&>());
>>
>> object slab_E_wall = slabwallmixed(1.0,1.0);
>> object slab_H_wall = slabwallmixed(1.0,-1.0);
>
> Cool! But are these objects only for C++ internal use, or can I export them to
> Python?
>
> def("slab_E_wall", slab_E_wall)
>
> won't compile.
What do you think it's supposed to do?
--
David Abrahams
dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
More information about the Cplusplus-sig
mailing list