OECountΒΆ

template<class T>
unsigned int OECount(OEIter<T> &iter)

template<class T>
unsigned int OECount(OEIterBase<T> *iter)

Count the number of elements in an iterator. Both methods have side-effects:

  • The OEIter version resets the iterator to the first element.
  • The OEIterBase version consumes the iterator.
int hcount = OECount<OEAtomBase>(mol.GetAtoms(OEIsHydrogen()));