|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Skipping typedefI'm using SWIG 1.3.36.
I have header that defines only this: #ifndef INCLUDE_VERTEX_ARRAY_H #define INCLUDE_VERTEX_ARRAY_H #include <common/CompactIndexArray.h> #include <mesh/mesh_types.h> namespace SDK { typedef CompactIndexArray VertexArray; } #endif I am including both the referenced headers (CompactIndexArray.h and mesh_types.h) in the SWIG interface file for SWIG to parse, but the typedef is not being created by SWIG. The id "VertexArray" doesn't appear in any of the generated files. "CompactIndexArray" is just a class. I assumed SWIG processed typedef's, so I'm wondering why this isn't available? Can I do some kind of alias in the interface file to make "CompactIndexArray" visible to the target language as "VertexArray"? ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Swig-user mailing list Swig-user@... https://lists.sourceforge.net/lists/listinfo/swig-user |
|
|
Re: Skipping typedefYes, use %rename. SWIG will understand what VertexArray means, but if the class is declared as CompactIndexArray then that will be the name used in the target language unless you precede the class definition with (I believe)
%rename(VertexArray) SDK::CompactIndexArray; > -----Original Message----- > From: Bob Hood [mailto:bhood2@...] > Sent: Wednesday, October 07, 2009 1:21 PM > To: swig-user@... > Subject: [Swig-user] Skipping typedef > > I'm using SWIG 1.3.36. > > I have header that defines only this: > > #ifndef INCLUDE_VERTEX_ARRAY_H > #define INCLUDE_VERTEX_ARRAY_H > > #include <common/CompactIndexArray.h> > #include <mesh/mesh_types.h> > > namespace SDK > { > typedef CompactIndexArray VertexArray; > } > #endif > > I am including both the referenced headers (CompactIndexArray.h and > mesh_types.h) in the SWIG interface file for SWIG to parse, but the > typedef is not being created by SWIG. The id "VertexArray" doesn't > appear in any of the generated files. "CompactIndexArray" is just a > class. > > I assumed SWIG processed typedef's, so I'm wondering why this isn't > available? Can I do some kind of alias in the interface file to make > "CompactIndexArray" visible to the target language as "VertexArray"? > > > ----------------------------------------------------------------------- > ------- > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Swig-user mailing list > Swig-user@... > https://lists.sourceforge.net/lists/listinfo/swig-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Swig-user mailing list Swig-user@... https://lists.sourceforge.net/lists/listinfo/swig-user |
|
|
Re: Skipping typedefI thought it would be something fairly obvious, and that I was just
being to dense to see it. Thanks, David. David Piepgrass wrote: > Yes, use %rename. SWIG will understand what VertexArray means, but if the class is declared as CompactIndexArray then that will be the name used in the target language unless you precede the class definition with (I believe) > > %rename(VertexArray) SDK::CompactIndexArray; ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Swig-user mailing list Swig-user@... https://lists.sourceforge.net/lists/listinfo/swig-user |
| Free embeddable forum powered by Nabble | Forum Help |