LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::IPSpace< PAYLOAD >::const_iterator Class Reference

#include <IPRange.h>

Inheritance diagram for swoc::IPSpace< PAYLOAD >::const_iterator:
Inheritance graph
Collaboration diagram for swoc::IPSpace< PAYLOAD >::const_iterator:
Collaboration graph

Public Types

using value_type = detail::ip_space_const_value_type<PAYLOAD>
 
using iterator_category = std::bidirectional_iterator_tag
 Import for API compliance.
 
using pointer = value_type const *
 
using reference = value_type const &
 
using difference_type = int
 

Public Member Functions

 const_iterator ()=default
 Default constructor.
 
 const_iterator (self_type const &that)=default
 Copy constructor.
 
self_typeoperator= (self_type const &that)
 Assignment.
 
self_typeoperator++ ()
 
self_typeoperator-- ()
 
self_type operator++ (int)
 
self_type operator-- (int)
 
reference operator* () const
 
pointer operator-> () const
 
bool operator== (self_type const &that) const
 Equality.
 
bool operator!= (self_type const &that) const
 Inequality.
 

Protected Member Functions

 const_iterator (typename IP4Space::const_iterator const &iter4, typename IP6Space::const_iterator const &iter6)
 
IP4Range const & r4 ()
 
IP6Range const & r6 ()
 

Protected Attributes

IP4Space::iterator _iter_4
 IPv4 sub-space iterator.
 
IP6Space::iterator _iter_6
 
value_type _value
 Current value.
 

Friends

class IPSpace
 

Detailed Description

template<typename PAYLOAD>
class swoc::IPSpace< PAYLOAD >::const_iterator

Constant iterator. The value type is a tuple of the IP address range and the PAYLOAD. Both are constant.

Definition at line 1246 of file IPRange.h.

Member Typedef Documentation

◆ difference_type

template<typename PAYLOAD>
using swoc::IPSpace< PAYLOAD >::const_iterator::difference_type = int

Definition at line 1256 of file IPRange.h.

◆ iterator_category

template<typename PAYLOAD>
using swoc::IPSpace< PAYLOAD >::const_iterator::iterator_category = std::bidirectional_iterator_tag

Import for API compliance.

Definition at line 1253 of file IPRange.h.

◆ pointer

template<typename PAYLOAD>
using swoc::IPSpace< PAYLOAD >::const_iterator::pointer = value_type const *

Definition at line 1254 of file IPRange.h.

◆ reference

template<typename PAYLOAD>
using swoc::IPSpace< PAYLOAD >::const_iterator::reference = value_type const &

Definition at line 1255 of file IPRange.h.

◆ value_type

template<typename PAYLOAD>
using swoc::IPSpace< PAYLOAD >::const_iterator::value_type = detail::ip_space_const_value_type<PAYLOAD>

Definition at line 1251 of file IPRange.h.

Constructor & Destructor Documentation

◆ const_iterator()

template<typename PAYLOAD>
swoc::IPSpace< PAYLOAD >::const_iterator::const_iterator ( typename IP4Space::const_iterator const & iter4,
typename IP6Space::const_iterator const & iter6 )
protected

Internal constructor.

Parameters
iter4Starting place for IPv4 subspace.
iter6Starting place for IPv6 subspace.

In practice, at most one iterator should be "internal", the other should be the beginning or end.

Definition at line 1717 of file IPRange.h.

Member Function Documentation

◆ operator!=()

template<typename PAYLOAD>
bool swoc::IPSpace< PAYLOAD >::const_iterator::operator!= ( self_type const & that) const

Inequality.

Definition at line 1821 of file IPRange.h.

◆ operator*()

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::const_iterator::operator* ( ) const

Dereference.

Returns
A reference to the referent.

Definition at line 1795 of file IPRange.h.

◆ operator++() [1/2]

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::const_iterator::operator++ ( )

Pre-increment. Move to the next element in the list.

Returns
The iterator.

Definition at line 1739 of file IPRange.h.

◆ operator++() [2/2]

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::const_iterator::operator++ ( int )

Post-increment. Move to the next element in the list.

Returns
The iterator value before the increment.

Definition at line 1762 of file IPRange.h.

◆ operator--() [1/2]

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::const_iterator::operator-- ( )

Pre-decrement. Move to the previous element in the list.

Returns
The iterator.

Definition at line 1770 of file IPRange.h.

◆ operator--() [2/2]

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::const_iterator::operator-- ( int )

Post-decrement. Move to the previous element in the list.

Returns
The iterator value before the decrement.

Definition at line 1787 of file IPRange.h.

◆ operator->()

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::const_iterator::operator-> ( ) const

Dereference.

Returns
A pointer to the referent.

Definition at line 1801 of file IPRange.h.

◆ operator=()

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::const_iterator::operator= ( self_type const & that)

Assignment.

Definition at line 1730 of file IPRange.h.

◆ operator==()

template<typename PAYLOAD>
bool swoc::IPSpace< PAYLOAD >::const_iterator::operator== ( self_type const & that) const

Equality.

Definition at line 1815 of file IPRange.h.

◆ r4()

template<typename PAYLOAD>
IP4Range const & swoc::IPSpace< PAYLOAD >::const_iterator::r4 ( )
inlineprotected
Returns
Properly type cast range from iterator.

Definition at line 1326 of file IPRange.h.

◆ r6()

template<typename PAYLOAD>
IP6Range const & swoc::IPSpace< PAYLOAD >::const_iterator::r6 ( )
inlineprotected
Returns
Properly type cast range from iterator.

Definition at line 1331 of file IPRange.h.

Friends And Related Symbol Documentation

◆ IPSpace

template<typename PAYLOAD>
friend class IPSpace
friend

Definition at line 1248 of file IPRange.h.

Member Data Documentation

◆ _iter_4

template<typename PAYLOAD>
IP4Space::iterator swoc::IPSpace< PAYLOAD >::const_iterator::_iter_4
protected

IPv4 sub-space iterator.

Definition at line 1307 of file IPRange.h.

◆ _iter_6

template<typename PAYLOAD>
IP6Space::iterator swoc::IPSpace< PAYLOAD >::const_iterator::_iter_6
protected

IPv6 sub-space iterator.

Definition at line 1308 of file IPRange.h.

◆ _value

template<typename PAYLOAD>
value_type swoc::IPSpace< PAYLOAD >::const_iterator::_value
protected

Current value.

Definition at line 1310 of file IPRange.h.


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