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

#include <IPRange.h>

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

Public Types

using value_type = detail::ip_space_value_type<PAYLOAD>
 Value type of iteration.
 
using pointer = value_type *
 
using reference = value_type &
 
- Public Types inherited from swoc::IPSpace< PAYLOAD >::const_iterator
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

 iterator ()=default
 Default constructor.
 
 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
 
- Public Member Functions inherited from swoc::IPSpace< PAYLOAD >::const_iterator
 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

 iterator (const_iterator const &that)
 
value_typevalue () const
 
- Protected Member Functions inherited from swoc::IPSpace< PAYLOAD >::const_iterator
 const_iterator (typename IP4Space::const_iterator const &iter4, typename IP6Space::const_iterator const &iter6)
 
IP4Range const & r4 ()
 
IP6Range const & r6 ()
 

Friends

class IPSpace
 

Additional Inherited Members

- Protected Attributes inherited from swoc::IPSpace< PAYLOAD >::const_iterator
IP4Space::iterator _iter_4
 IPv4 sub-space iterator.
 
IP6Space::iterator _iter_6
 
value_type _value
 Current value.
 

Detailed Description

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

Iterator. The value type is a tuple of the IP address range and the PAYLOAD. The range is constant and the PAYLOAD is a reference. This can be used to update the PAYLOAD for this range.

Note
Range merges are not triggered by modifications of the PAYLOAD via an iterator.

Definition at line 1342 of file IPRange.h.

Member Typedef Documentation

◆ pointer

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

Definition at line 1357 of file IPRange.h.

◆ reference

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

Definition at line 1358 of file IPRange.h.

◆ value_type

template<typename PAYLOAD>
using swoc::IPSpace< PAYLOAD >::iterator::value_type = detail::ip_space_value_type<PAYLOAD>

Value type of iteration.

Definition at line 1356 of file IPRange.h.

Constructor & Destructor Documentation

◆ iterator()

template<typename PAYLOAD>
swoc::IPSpace< PAYLOAD >::iterator::iterator ( const_iterator const & that)
inlineprotected

Inherit supertype constructors. Protected constructor to convert const to non-const.

Note
This makes for much less code duplication in iterator relevant methods.

Definition at line 1352 of file IPRange.h.

Member Function Documentation

◆ operator*()

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

Dereference.

Returns
A reference to the referent.

Definition at line 1846 of file IPRange.h.

◆ operator++() [1/2]

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

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

Returns
The iterator.

Definition at line 1852 of file IPRange.h.

◆ operator++() [2/2]

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

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

Returns
The iterator value before the increment.

Definition at line 1859 of file IPRange.h.

◆ operator--() [1/2]

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

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

Returns
The iterator.

Definition at line 1867 of file IPRange.h.

◆ operator--() [2/2]

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

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

Returns
The iterator value before the decrement.

Definition at line 1874 of file IPRange.h.

◆ operator->()

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

Dereference.

Returns
A pointer to the referent.

Definition at line 1840 of file IPRange.h.

◆ operator=()

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

Assignment.

Definition at line 1827 of file IPRange.h.

◆ value()

template<typename PAYLOAD>
auto swoc::IPSpace< PAYLOAD >::iterator::value ( ) const
protected

Definition at line 1834 of file IPRange.h.

Friends And Related Symbol Documentation

◆ IPSpace

template<typename PAYLOAD>
friend class IPSpace
friend

Definition at line 1346 of file IPRange.h.


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