Swig - Working with multiple modules

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Swig - Working with multiple modules

This post has NOT been accepted by the mailing list yet.
I am using Swig to generate java interfaces from C++ interfaces. The java interface example as of now only serves as a layer of abstraction and cannot be used as a collection. I hope below example can help you understand better.

Suppose I have two packages A, B and I have a temperature interface. Suppose, Both packages use temperature interface. Can two or more wrapper packages share a single interface type, basically can I do (A. Temperature == B.Temperature)? I have an example below with errors.

import A.*;
import B.*.;

public class HelloWorld
public static void main(String[] args) {
     ITemperatureSensor a;

HelloWorld.java:7: error: reference to ITemperatureSensor is ambiguous
ITemperatureSensor a;

both interface A.TemperatureSensor in A and interface B.TemperatureSensor in B match
1 error
Thanks in Advance.