stop including our own std_vector.i, instead just extend the one provided with swig; duplicate the std_list file into the csharp wrapper in case it ends up needing to be different

This commit is contained in:
Greg Landrum
2012-11-21 16:11:16 +00:00
parent 3a78545b2b
commit dafff3bcaf
5 changed files with 96 additions and 103 deletions

View File

@@ -0,0 +1,27 @@
/* -----------------------------------------------------------------------------
* extend_std_vector.i
* ----------------------------------------------------------------------------- */
%extend std::vector {
bool equals(const vector<T> &o){
if(self->size()==o.size()){
std::vector< T >::const_iterator sIt=self->begin();
std::vector< T >::const_iterator oIt=o.begin();
while(sIt != self->end()){
if(*sIt != *oIt) return false;
++sIt;
++oIt;
}
return true;
} else {
return false;
}
}
};
%include <std_vector.i>