|
About using std vector: msg#00056programming.swig
I would be grateful for some advice on this apparently simple situation. I use a std::vector<const double*> to sort a (very long, like 10^6) sequence of objects. The actual objects are in a container that has a member function like this: std::vector<const double*> getPointers() const; I then have my sort function that expects the vector of pointers as an argument, like this: void sort(std::vector<const double*> &, ...other stuff...); and will re-order the pointers in the vector according to sorting criteria. My question / problem is this. In Python, the SWIG wrapping for getPointers returns a tuple of vectors, which I cannot use as an argument to sort! (I have done a %template to let SWIG know about std::vector<const double*>) What should I do? I could change my member function to this: void getPointers(std::vector<const double*>&) const; but this forces me to change an otherwise convenient C++ interface. Is there an alternative solution that I could consider? _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: how to use the autodoc feature of new swig-1.3.22?: 00056, Robin Dunn |
|---|---|
| Next by Date: | Re: About using std vector: 00056, Josh Cherry |
| Previous by Thread: | how to use the autodoc feature of new swig-1.3.22?i: 00056, Bo Peng |
| Next by Thread: | Re: About using std vector: 00056, Josh Cherry |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |