[cable] CableSwig: Python wrappers don't wrap public member data

Brad King brad.king at kitware.com
Wed Sep 10 17:48:51 EDT 2003


> I've created a simple test based on a C++ struct with a single, public
> integer data member. When I try to generate a Python wrapper for this
> struct, the wrapper does not include any code for accessing the data
> member.  According to the basic SWIG documentation, SWIG-generated
> wrappers should wrap all public data members by default.  I don't
> understand what is different about cswig.

CableSwig uses GCC-XML as a front-end parser to help swig handle more
complicated C++ code with things like deeply nested template
instantiations.  It was written for ITK (www.itk.org), which does not
export public data members from its classes.  Thus that part of the
GCC-XML output is never translated into the SWIG internal representation,
so SWIG doesn't know about the data members.

-Brad




More information about the cable mailing list