MCPcopy Create free account
hub / github.com/chokkan/crfsuite / SwigPySequence_InputIterator

Class SwigPySequence_InputIterator

swig/python/export_wrap.cpp:4626–4718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4624
4625 template <class T, class Reference >
4626 struct SwigPySequence_InputIterator
4627 {
4628 typedef SwigPySequence_InputIterator<T, Reference > self;
4629
4630 typedef std::random_access_iterator_tag iterator_category;
4631 typedef Reference reference;
4632 typedef T value_type;
4633 typedef T* pointer;
4634 typedef int difference_type;
4635
4636 SwigPySequence_InputIterator()
4637 {
4638 }
4639
4640 SwigPySequence_InputIterator(PyObject* seq, int index)
4641 : _seq(seq), _index(index)
4642 {
4643 }
4644
4645 reference operator*() const
4646 {
4647 return reference(_seq, _index);
4648 }
4649
4650 SwigPySequence_ArrowProxy<T>
4651 operator->() const {
4652 return SwigPySequence_ArrowProxy<T>(operator*());
4653 }
4654
4655 bool operator==(const self& ri) const
4656 {
4657 return (_index == ri._index) && (_seq == ri._seq);
4658 }
4659
4660 bool operator!=(const self& ri) const
4661 {
4662 return !(operator==(ri));
4663 }
4664
4665 self& operator ++ ()
4666 {
4667 ++_index;
4668 return *this;
4669 }
4670
4671 self& operator -- ()
4672 {
4673 --_index;
4674 return *this;
4675 }
4676
4677 self& operator += (difference_type n)
4678 {
4679 _index += n;
4680 return *this;
4681 }
4682
4683 self operator +(difference_type n) const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected