ipaddress 1.2.0
|
Forward iterator for summarizing an IP address range. More...
#include <ip-network-iterator.hpp>
Public Types | |
using | iterator_category = std::forward_iterator_tag |
The category of the iterator. | |
using | value_type = T |
The type of value iterated over. | |
using | difference_type = typename value_type::uint_type |
Type to represent the difference between two iterators. | |
using | pointer = const value_type* |
Pointer to the value type. | |
using | reference = const value_type& |
Reference to the value type. | |
using | ip_address_type = typename value_type::ip_address_type |
The underlying IP address type. | |
using | uint_type = typename value_type::uint_type |
Unsigned integer type used for addressing. | |
Public Member Functions | |
constexpr inline | ip_summarize_iterator () noexcept |
Default constructor. | |
constexpr inline | ip_summarize_iterator (const ip_address_type ¤t, const ip_address_type &last) noexcept |
Constructs a ip_summarize_iterator for an address range. | |
constexpr inline reference | operator* () const noexcept |
Returns a reference to the current element. | |
constexpr inline pointer | operator-> () const noexcept |
Returns a pointer to the current element. | |
constexpr inline ip_summarize_iterator & | operator++ () noexcept |
Pre-increment operator. | |
constexpr inline ip_summarize_iterator | operator++ (int) noexcept |
Post-increment operator. | |
constexpr inline bool | operator== (const ip_summarize_iterator &other) const noexcept |
Equality operator. | |
constexpr inline bool | operator!= (const ip_summarize_iterator &other) const noexcept |
Inequality operator. | |
Forward iterator for summarizing an IP address range.
This iterator traverses a contiguous range of IP addresses by computing and yielding the largest possible network (IP subnet) that begins at the current IP and does not extend beyond the specified upper bound. On each iteration emits an ip network object representing the summarized subnet.
T | The type of IPv4 or IPv6 network to iterate over. |
|
inlinenoexcept |
Constructs a ip_summarize_iterator for an address range.
[in] | current | The starting IP address of the range. |
[in] | last | The ending IP address of the range. |
|
inlinenodiscardnoexcept |
Returns a reference to the current element.
|
inlinenodiscardnoexcept |
Returns a pointer to the current element.
|
inlinenoexcept |
Pre-increment operator.
Increments the iterator to the next element.
|
inlinenoexcept |
Post-increment operator.
Increments the iterator to the next element and returns the iterator before the increment.
|
inlinenodiscardnoexcept |
Equality operator.
Compares two ip_summarize_iterator for equality.
[in] | other | The ip_summarize_iterator to compare with. |
true
if the iterators are equal, false
otherwise.
|
inlinenodiscardnoexcept |
Inequality operator.
Compares two ip_summarize_iterator for inequality.
[in] | other | The ip_summarize_iterator to compare with. |
true
if the iterators are not equal, false
otherwise.