logo       

SWIG-PERL-Vector of pointers: msg#00088

programming.swig

Subject: SWIG-PERL-Vector of pointers

Hi,

            I’m trying to use STL typemap for Perl. I want to pass a vector of structure pointers from perl to c++ code (and back). Swig complains with the following error message

 

swig\Lib/perl5/std_vector.i:215: Syntax error in input.

std_vector.i:216: Syntax error in input.

 

 

I have a structure defined and my .i file has following entries:

 

%module SLI

 

namespace std {

            specialize_std_vector(ABC::BpDataStruct_SLI*);

}

 

namespace ABC {

 

struct BpDataStruct_SLI{

            long      type;

            BpDataTypesStruct_SLI val;

};

 

typedef std::vector<BpDataStruct_SLI*> BpDataStruct_SLI_vector;

};

 

%template(BpDataStruct_SLI_vector) std::vector<ABC::BpDataStruct_SLI*>;

 

 

Your help will be appreciated.

 

Thanks,

~sn

 

 

 

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise