logo       

Re: SWIG-PERL-Vector of pointers: msg#00103

programming.swig

Subject: Re: SWIG-PERL-Vector of pointers

On 2003.11.17 17:49, "Nair, Sanjay S" wrote:
I have the following swig code

%module SbsdSLI

%include "std_vector.i"

%template (Int_vector) std::vector<int>;
typedef std::vector<int> Int_vector;

namespace SBSD {

struct BpDataStruct_SLI{
long type;
};
typedef std::vector<BpDataStruct_SLI> BpDataStruct_SLI_vector;

class ItpBreakpointSLIProxy {

int ReadBp ( const Int_vector& vReadData,
BpDataStruct_SLI_vector& vReadData );
};
};

Well, you do have to instantiate the template. The directive

%template(BpDataStruct_SLI_vector) std::vector<SBSD::BpDataStruct_SLI>

should do the trick. If that fails, try

namespace SBSD {
%template(BpDataStruct_SLI_vector) std::vector<BpDataStruct_SLI>
}

Also, do you support Vector of pointers in SWIG?

I'll have to check that.

Later,
Luigi
_______________________________________________
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