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

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

Definition at line 148 of file ipcache.h.

Definition at line 150 of file ipcache.h.

Definition at line 144 of file ipcache.h.

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

Definition at line 145 of file ipcache.h.

Definition at line 151 of file ipcache.h.

Definition at line 149 of file ipcache.h.

Constructor & Destructor Documentation

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

Definition at line 153 of file ipcache.h.

References sync().

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

Definition at line 155 of file ipcache.h.

Member Function Documentation

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

Definition at line 167 of file ipcache.h.

References position_, and raw_.

Referenced by operator*(), operator->(), and sync().

void Dns::GoodIpsIterator::next ( )
inlineprivate

Definition at line 168 of file ipcache.h.

References position_, and processed_.

Referenced by operator++(), and sync().

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

Definition at line 164 of file ipcache.h.

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

Definition at line 157 of file ipcache.h.

References current(), and Dns::CachedIp::ip.

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

Definition at line 160 of file ipcache.h.

References next(), and sync().

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

Definition at line 161 of file ipcache.h.

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

Definition at line 158 of file ipcache.h.

References current(), and Dns::CachedIp::ip.

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

Definition at line 163 of file ipcache.h.

References processed_.

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

Definition at line 169 of file ipcache.h.

References Dns::CachedIp::bad(), current(), next(), processed_, and raw_.

Referenced by GoodIpsIterator(), and operator++().

Member Data Documentation

size_t Dns::GoodIpsIterator::position_
private

Definition at line 172 of file ipcache.h.

Referenced by current(), and next().

size_t Dns::GoodIpsIterator::processed_
private

Definition at line 173 of file ipcache.h.

Referenced by next(), operator==(), and sync().

const Raw& Dns::GoodIpsIterator::raw_
private

Definition at line 171 of file ipcache.h.

Referenced by current(), and sync().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors