Iterates over good IPs in CachedIps, starting at the so called current one. More...

#include <ipcache.h>

Collaboration diagram for Dns::GoodIpsIterator:

Public Types

typedef std::vector< CachedIpRaw
 
typedef Raw::const_iterator RawIterator
 
using iterator_category = std::forward_iterator_tag
 
using value_type = const Ip::Address
 
using pointer = value_type *
 
using reference = value_type &
 

Public Member Functions

 GoodIpsIterator (const Raw &raw, const size_t currentPos)
 
 GoodIpsIterator (const Raw &raw)
 
reference operator* () const
 
pointer operator-> () const
 
GoodIpsIteratoroperator++ ()
 
GoodIpsIterator operator++ (int)
 
bool operator== (const GoodIpsIterator them) const
 
bool operator!= (const GoodIpsIterator them) const
 

Private Member Functions

const CachedIpcurrent () const
 
void next ()
 
void sync ()
 

Private Attributes

const Rawraw_
 CachedIps being iterated. More...
 
size_t position_
 current iteration location, modulo raw.size() More...
 
size_t processed_
 number of visited positions, including skipped ones More...
 

Detailed Description

Definition at line 141 of file ipcache.h.

Member Typedef Documentation

◆ iterator_category

using Dns::GoodIpsIterator::iterator_category = std::forward_iterator_tag

Definition at line 148 of file ipcache.h.

◆ pointer

Definition at line 150 of file ipcache.h.

◆ Raw

Definition at line 144 of file ipcache.h.

◆ RawIterator

typedef Raw::const_iterator Dns::GoodIpsIterator::RawIterator

Definition at line 145 of file ipcache.h.

◆ reference

Definition at line 151 of file ipcache.h.

◆ value_type

Definition at line 149 of file ipcache.h.

Constructor & Destructor Documentation

◆ GoodIpsIterator() [1/2]

Dns::GoodIpsIterator::GoodIpsIterator ( const Raw raw,
const size_t  currentPos 
)
inline

Definition at line 153 of file ipcache.h.

◆ GoodIpsIterator() [2/2]

Dns::GoodIpsIterator::GoodIpsIterator ( const Raw raw)
inlineexplicit

Definition at line 155 of file ipcache.h.

Member Function Documentation

◆ current()

const CachedIp& Dns::GoodIpsIterator::current ( ) const
inlineprivate

Definition at line 167 of file ipcache.h.

◆ next()

void Dns::GoodIpsIterator::next ( )
inlineprivate

Definition at line 168 of file ipcache.h.

◆ operator!=()

bool Dns::GoodIpsIterator::operator!= ( const GoodIpsIterator  them) const
inline

Definition at line 164 of file ipcache.h.

◆ operator*()

reference Dns::GoodIpsIterator::operator* ( ) const
inline

Definition at line 157 of file ipcache.h.

◆ operator++() [1/2]

GoodIpsIterator& Dns::GoodIpsIterator::operator++ ( )
inline

Definition at line 160 of file ipcache.h.

◆ operator++() [2/2]

GoodIpsIterator Dns::GoodIpsIterator::operator++ ( int  )
inline

Definition at line 161 of file ipcache.h.

◆ operator->()

pointer Dns::GoodIpsIterator::operator-> ( ) const
inline

Definition at line 158 of file ipcache.h.

◆ operator==()

bool Dns::GoodIpsIterator::operator== ( const GoodIpsIterator  them) const
inline

Definition at line 163 of file ipcache.h.

References processed_.

◆ sync()

void Dns::GoodIpsIterator::sync ( void  )
inlineprivate

Definition at line 169 of file ipcache.h.

Member Data Documentation

◆ position_

size_t Dns::GoodIpsIterator::position_
private

Definition at line 172 of file ipcache.h.

◆ processed_

size_t Dns::GoodIpsIterator::processed_
private

Definition at line 173 of file ipcache.h.

Referenced by operator==().

◆ raw_

const Raw& Dns::GoodIpsIterator::raw_
private

Definition at line 171 of file ipcache.h.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors