Iterates over good IPs in CachedIps, starting at the so called current one. More...
#include <ipcache.h>
Public Types | |
typedef std::vector< CachedIp > | Raw |
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 |
GoodIpsIterator & | operator++ () |
GoodIpsIterator | operator++ (int) |
bool | operator== (const GoodIpsIterator them) const |
bool | operator!= (const GoodIpsIterator them) const |
Private Member Functions | |
const CachedIp & | current () const |
void | next () |
void | sync () |
Private Attributes | |
const Raw & | raw_ |
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
Member Typedef Documentation
◆ iterator_category
using Dns::GoodIpsIterator::iterator_category = std::forward_iterator_tag |
◆ pointer
using Dns::GoodIpsIterator::pointer = value_type * |
◆ Raw
typedef std::vector<CachedIp> Dns::GoodIpsIterator::Raw |
◆ RawIterator
typedef Raw::const_iterator Dns::GoodIpsIterator::RawIterator |
◆ reference
using Dns::GoodIpsIterator::reference = value_type & |
◆ value_type
using Dns::GoodIpsIterator::value_type = const Ip::Address |
Constructor & Destructor Documentation
◆ GoodIpsIterator() [1/2]
◆ GoodIpsIterator() [2/2]
|
inlineexplicit |
Member Function Documentation
◆ current()
|
inlineprivate |
Definition at line 167 of file ipcache.h.
References position_, and raw_.
Referenced by operator*(), operator->(), and sync().
◆ next()
|
inlineprivate |
Definition at line 168 of file ipcache.h.
References position_, and processed_.
Referenced by operator++(), and sync().
◆ operator!=()
|
inline |
◆ operator*()
|
inline |
Definition at line 157 of file ipcache.h.
References current(), and Dns::CachedIp::ip.
◆ operator++() [1/2]
|
inline |
◆ operator++() [2/2]
|
inline |
◆ operator->()
|
inline |
Definition at line 158 of file ipcache.h.
References current(), and Dns::CachedIp::ip.
◆ operator==()
|
inline |
Definition at line 163 of file ipcache.h.
References processed_.
◆ sync()
|
inlineprivate |
Definition at line 169 of file ipcache.h.
References current(), next(), processed_, and raw_.
Referenced by GoodIpsIterator(), and operator++().
Member Data Documentation
◆ position_
|
private |
◆ processed_
|
private |
Definition at line 173 of file ipcache.h.
Referenced by next(), operator==(), and sync().
◆ raw_
|
private |
The documentation for this class was generated from the following file:
- src/ipcache.h