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

Class SwigPyIteratorOpen_T

swig/python/export_wrap.cpp:4462–4500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4460 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4461 typename FromOper = from_oper<ValueType> >
4462 class SwigPyIteratorOpen_T : public SwigPyIterator_T<OutIterator>
4463 {
4464 public:
4465 FromOper from;
4466 typedef OutIterator out_iterator;
4467 typedef ValueType value_type;
4468 typedef SwigPyIterator_T<out_iterator> base;
4469 typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
4470
4471 SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
4472 : SwigPyIterator_T<OutIterator>(curr, seq)
4473 {
4474 }
4475
4476 PyObject *value() const {
4477 return from(static_cast<const value_type&>(*(base::current)));
4478 }
4479
4480 SwigPyIterator *copy() const
4481 {
4482 return new self_type(*this);
4483 }
4484
4485 SwigPyIterator *incr(size_t n = 1)
4486 {
4487 while (n--) {
4488 ++base::current;
4489 }
4490 return this;
4491 }
4492
4493 SwigPyIterator *decr(size_t n = 1)
4494 {
4495 while (n--) {
4496 --base::current;
4497 }
4498 return this;
4499 }
4500 };
4501
4502 template<typename OutIterator,
4503 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected