Files
rdkit/Code/JavaWrappers/extend_std_vector.i
Greg Landrum aa336f3faf Get the wrappers working with SWIG 4.0 (#5795)
* extend the allowed valences of the alkali earths
make it possible to have preferred and arbitrary valence states (I thought this already worked)

* backup

* maybe needed

* copy in some swig3 files;
at this point the tests all work

* remove SWIG version lock

* changes in response to review
2022-12-10 07:13:55 +01:00

33 lines
732 B
OpenEdge ABL

/* -----------------------------------------------------------------------------
* 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;
}
}
};
// suggested in the CHANGELOG for SWIG 4.0
%extend std::vector {
vector(size_type count) { return new std::vector< T >(count); }
}
%include "std_vector.i"