|
Re: How to return a std::vector of pointers to Java?: msg#00148programming.swig
Henrietta Slack wrote: Hi, I'm just getting started with SWIG as a Java to C++ bridge. I need to return a std::vector of pointers from C++ to Java and I'm stuck; the code below works beautifully, I just need to convert the values to pointers. Firstly, the %template should really be placed after the definition of A, at the end of the file should work. Vectors of pointers are not very well supported, however, you can get them to work with a bit of manual intervention by supplying some new typemaps with the help of the specialize_std_vector macro: %include "std_vector.i" namespace std { specialize_std_vector(ClassA*); } William _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Supplying default OUTPUT values: 00148, William S Fulton |
|---|---|
| Next by Date: | FW: [jreed@xxxxxxxxxxxx: Csharp module and memory pressure on GC]: 00148, William . Fulton |
| Previous by Thread: | How to return a std::vector of pointers to Java?i: 00148, Henrietta Slack |
| Next by Thread: | Java char *INOUT doesn't OUT: 00148, Gary Nissen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |