|
C++ class inheritance using shadow class: msg#00080programming.swig
Hi there, I've been using Swig successfully for a while now but I'm stuck with this one! I've got a basic C++ class: class System { public: System(void); float Dt; float VoxelSize; int NVoxelX, NVoxelY,NVoxelZ; Vector SimulationBoxOrigin; }; inline System::System(void) { Dt = 0; VoxelSize = 0; NVoxelX = NVoxelY = NVoxelZ = 0; SimulationBoxOrigin = Vector(0,0,0); } I then swig it using shadow classes, that works fine. Now I would like to add extra python features to this classes, so I want to use inheritance. >>> class Sys(System): ... def __init__(self): ... print Sys.VoxelSize ... >>> c = Sys() <property object at 0x818ce24> >>> c.VoxelSize Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: Type error. Expected _p_System >>> The inheritance doesn't seem to work! Any reason why that should be?? Looking forward to your suggestions, Alex _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: how to use the autodoc feature of new swig-1.3.22?: 00080, Robin Dunn |
|---|---|
| Next by Date: | Re: C++ class inheritance using shadow class: 00080, Josh Cherry |
| Previous by Thread: | How to insert Python GIL manipulation code?i: 00080, David Rushby |
| Next by Thread: | Re: C++ class inheritance using shadow class: 00080, Josh Cherry |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |