mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-07 22:44:25 +08:00
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:
27
Code/JavaWrappers/extend_std_vector.i
Normal file
27
Code/JavaWrappers/extend_std_vector.i
Normal 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>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user