[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] SWIG only inherits interfaces from smart pointers
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] SWIG only inherits interfaces from smart pointers |
Date: |
Wed, 28 Nov 2007 04:32:43 -0800 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Tue, Nov 27, 2007 at 06:57:12PM -0600, Ketan Mandke wrote:
> I have been trying to create a GNU Radio project composed of various
> swig wrapped modules. In order to explain my problem, the following
> subproblem might be useful to know about. I apologize ahead of time
> for the length of this email. =)
>
> SUBPROBLEM:
> I would like to be able to have class B in module modB inherit from
> class A in module modA. This would be implemented across two SWIG
> interface files modB.i and modA.i.
>
> // modA.i
> #ifndef SWIGIMPORTED
> %module modA
> #endif
>
> %{
> #include <classA.h>
> %}
> %include <classA.h>
> ------------------------------------------------
> // modB.i
> #ifndef SWIGIMPORTED
> %module modB
> #endif
> %import modA.i
>
> %{
> #include <classB.h>
> %}
> %include <classB.h>
> ------------------------------------------------
> // classA.h
> class A
> { ... }
> ------------------------------------------------
> // classB.h
> class B : class A
This should probably read:
class B : public class A
Without the "public", none of A's interfaces will be visible from
instances of B.
Eric