[C++-sig] Wrapping multiple class_<T> objects

Peter Bienstman Peter.Bienstman at rug.ac.be
Wed Nov 20 11:42:58 CET 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I'm trying to wrap a class and two specific instances of it:

  class_<SlabWallMixed, bases<SlabWall> >
    ("SlabWallMixed", init<const Complex&, const Complex&>());

  object slab_E_wall 
    = (class_<SlabWallMixed, bases<SlabWall> >
       ("slab_E_wall", init<const Complex&, const Complex&>()))(1.0,1.0);
  
  object slab_H_wall 
    = (class_<SlabWallMixed, bases<SlabWall> >
       ("slab_H_wall", init<const Complex&, const Complex&>()))(1.0,-1.0); 

Any of these statements by themselves work fine, but if I combine two or more, 
I get:

RuntimeError: trying to register to_python_converter for a type which already 
has a registered to_python_converter

Did I get the syntax wrong or is this currenty impossible?

Thanks!

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)

iD8DBQE922cy4dgPAIjyquoRAsAeAJ9KNuBGfXLzdh58ez3LzGi6WbP+0wCfRNEA
h1A6VuMjbERh2aYqvM7XCRc=
=k0Wz
-----END PGP SIGNATURE-----





More information about the Cplusplus-sig mailing list