[C++-sig] Wrapping multiple class_<T> objects
Peter Bienstman
Peter.Bienstman at rug.ac.be
Wed Nov 20 14:31:57 CET 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
Peter
- --
- ------------------------------------------------
Peter Bienstman
Ghent University, Dep. of Information Technology
Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium
tel: +32 9 264 34 45, fax: +32 9 264 35 93
email: Peter.Bienstman at rug.ac.be
- ------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9247N4dgPAIjyquoRApANAKD1HJlALdgkx2sR3bI0Bhf4NGFhBgCfbfYE
05qULPbixzSo3v2dkgxLGXA=
=GIf3
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list