logo       

Proxy classes from nested C structs?: msg#00128

programming.swig

Subject: Proxy classes from nested C structs?

I'm considering an implementation of object inheritance and
polymorphism in C. I know there is full SWIG support for C++
inheritance, but C++ is not an option for me. Can SWIG be
directed to generate proxy classes that follow a struct-based
inheritance?

For example, I have these definitions

struct Base {
int id;
};

typedef struct Base base_obj;

struct Derived {
base_obj base;
};

that, using pointer cast polymorphism, allow for rudimentary
00 programming in C. Can SWIG be directed so that the Derived
proxy class behaves as though it were inheriting from the Base
proxy class?

Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies

_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise