Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util::ChasingIterator< IndexT, sentinel, Tag > Class Template Reference

Detailed Description

template<typename IndexT, const IndexT & sentinel, typename Tag>
class util::ChasingIterator< IndexT, sentinel, Tag >

A helper class for implementing list graph iterators: This does pointer chasing on next until sentinel is found. Tag allows distinguishing different iterators with the same index type and sentinel.

Definition at line 250 of file iterators.h.

#include <iterators.h>

Inheritance diagram for util::ChasingIterator< IndexT, sentinel, Tag >:

Public Types

using difference_type = ptrdiff_t
using value_type = IndexT

Public Member Functions

 ChasingIterator ()
 ChasingIterator (IndexT index, const IndexT *next)
IndexT operator* () const
ChasingIteratoroperator++ ()
ChasingIterator operator++ (int)

Friends

bool operator== (const ChasingIterator &l, const ChasingIterator &r)
bool operator!= (const ChasingIterator &l, const ChasingIterator &r)

Member Typedef Documentation

◆ difference_type

template<typename IndexT, const IndexT & sentinel, typename Tag>
using util::ChasingIterator< IndexT, sentinel, Tag >::difference_type = ptrdiff_t

Definition at line 256 of file iterators.h.

◆ value_type

template<typename IndexT, const IndexT & sentinel, typename Tag>
using util::ChasingIterator< IndexT, sentinel, Tag >::value_type = IndexT

Definition at line 257 of file iterators.h.

Constructor & Destructor Documentation

◆ ChasingIterator() [1/2]

template<typename IndexT, const IndexT & sentinel, typename Tag>
util::ChasingIterator< IndexT, sentinel, Tag >::ChasingIterator ( )
inline

Definition at line 264 of file iterators.h.

◆ ChasingIterator() [2/2]

template<typename IndexT, const IndexT & sentinel, typename Tag>
util::ChasingIterator< IndexT, sentinel, Tag >::ChasingIterator ( IndexT index,
const IndexT * next )
inline

Definition at line 266 of file iterators.h.

Member Function Documentation

◆ operator*()

template<typename IndexT, const IndexT & sentinel, typename Tag>
IndexT util::ChasingIterator< IndexT, sentinel, Tag >::operator* ( ) const
inline

Definition at line 269 of file iterators.h.

◆ operator++() [1/2]

template<typename IndexT, const IndexT & sentinel, typename Tag>
ChasingIterator & util::ChasingIterator< IndexT, sentinel, Tag >::operator++ ( )
inline

Definition at line 271 of file iterators.h.

◆ operator++() [2/2]

template<typename IndexT, const IndexT & sentinel, typename Tag>
ChasingIterator util::ChasingIterator< IndexT, sentinel, Tag >::operator++ ( int )
inline

Definition at line 275 of file iterators.h.

◆ operator!=

template<typename IndexT, const IndexT & sentinel, typename Tag>
bool operator!= ( const ChasingIterator< IndexT, sentinel, Tag > & l,
const ChasingIterator< IndexT, sentinel, Tag > & r )
friend

Definition at line 284 of file iterators.h.

◆ operator==

template<typename IndexT, const IndexT & sentinel, typename Tag>
bool operator== ( const ChasingIterator< IndexT, sentinel, Tag > & l,
const ChasingIterator< IndexT, sentinel, Tag > & r )
friend

Definition at line 281 of file iterators.h.


The documentation for this class was generated from the following file: