template class cv::SeqIterator

Overview

STL-style Sequence Iterator inherited from the CvSeqReader structure Moreā€¦

#include <core_c.h>

template <typename _Tp>
class SeqIterator: public CvSeqReader
{
public:
    // fields

    int index;

    // construction

    SeqIterator();

    SeqIterator(
        const Seq<_Tp>& seq,
        bool seekEnd = false
        );

    // methods

    _Tp&
    operator*();

    const _Tp&
    operator*() const;

    SeqIterator&
    operator++();

    SeqIterator
    operator++(int) const;

    SeqIterator&
    operator+=(int delta);

    SeqIterator&
    operator--();

    SeqIterator
    operator--(int) const;

    SeqIterator&
    operator-=(int delta);

    void
    seek(size_t pos);

    size_t
    tell() const;
};

Inherited Members

public:
    // fields

    CvSeqBlock* block;
    schar* block_max;
    schar* block_min;
    int delta_index;
    int header_size;
    schar* prev_elem;
    schar* ptr;
    CvSeq* seq;

Detailed Documentation

STL-style Sequence Iterator inherited from the CvSeqReader structure

Construction

SeqIterator()

the default constructor

SeqIterator(
    const Seq<_Tp>& seq,
    bool seekEnd = false
    )

the constructor setting the iterator to the beginning or to the end of the sequence

Methods

_Tp&
operator*()

returns reference to the current sequence element

const _Tp&
operator*() const

returns read-only reference to the current sequence element

SeqIterator&
operator++()

moves iterator to the next sequence element

SeqIterator
operator++(int) const

moves iterator to the next sequence element

SeqIterator&
operator+=(int delta)

moves iterator forward by the specified offset (possibly negative)

SeqIterator&
operator--()

moves iterator to the previous sequence element

SeqIterator
operator--(int) const

moves iterator to the previous sequence element

SeqIterator&
operator-=(int delta)

moves iterator backward by the specified offset (possibly negative)

void
seek(size_t pos)

positions the iterator within the sequence

size_t
tell() const

reports the current iterator position