ipaddress 1.1.0
|
An iterator to traverse IP addresses within a network, excluding specified subnets. 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 = int64_t |
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. | |
Public Member Functions | |
constexpr inline | ip_exclude_network_iterator () noexcept=default |
Default constructor. | |
constexpr inline | ip_exclude_network_iterator (reference network, reference other) noexcept |
Constructs an iterator for a network, excluding addresses from another network. | |
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_exclude_network_iterator & | operator++ () |
Pre-increment operator. | |
constexpr inline ip_exclude_network_iterator | operator++ (int) |
Post-increment operator. | |
constexpr inline bool | operator== (const ip_exclude_network_iterator &other) const noexcept |
Equality operator. | |
constexpr inline bool | operator!= (const ip_exclude_network_iterator &other) const noexcept |
Inequality operator. | |
constexpr inline bool | operator< (const ip_exclude_network_iterator &other) const noexcept |
Less-than operator. | |
constexpr inline bool | operator<= (const ip_exclude_network_iterator &other) const noexcept |
Less-than-or-equal-to operator. | |
constexpr inline bool | operator> (const ip_exclude_network_iterator &other) const noexcept |
Greater-than operator. | |
constexpr inline bool | operator>= (const ip_exclude_network_iterator &other) const noexcept |
Greater-than-or-equal-to operator. | |
An iterator to traverse IP addresses within a network, excluding specified subnets.
This iterator advances through IP addresses within a specified network, skipping over those that belong to a subnet that should be excluded from the traversal. This is particularly useful for operations where certain ranges of IP addresses are reserved or otherwise should not be included.
T | The type of IPv4 or IPv6 network to iterate over, excluding specified subnets. |
|
inlinenoexcept |
Constructs an iterator for a network, excluding addresses from another network.
[in] | network | The network to iterate over. |
[in] | other | The network whose addresses are to be excluded. |
|
inlinenoexcept |
Returns a reference to the current element.
|
inlinenoexcept |
Returns a pointer to the current element.
|
inline |
Pre-increment operator.
|
inline |
Post-increment operator.
|
inlinenoexcept |
Equality operator.
Compares two ip_exclude_network_iterator for equality.
[in] | other | The ip_exclude_network_iterator to compare with. |
true
if the iterators are equal, false
otherwise.
|
inlinenoexcept |
Inequality operator.
Compares two ip_exclude_network_iterator for inequality.
[in] | other | The ip_exclude_network_iterator to compare with. |
true
if the iterators are not equal, false
otherwise.
|
inlinenoexcept |
Less-than operator.
Compares two ip_exclude_network_iterator to determine if the left one is less than the right one.
[in] | other | The ip_exclude_network_iterator to compare with. |
true
if the left iterator is less than the right iterator, false
otherwise.
|
inlinenoexcept |
Less-than-or-equal-to operator.
Compares two ip_exclude_network_iterator to determine if the left one is less than or equal to the right one.
[in] | other | The ip_exclude_network_iterator to compare with. |
true
if the left iterator is less than or equal to the right iterator, false
otherwise.
|
inlinenoexcept |
Greater-than operator.
Compares two ip_exclude_network_iterator to determine if the left one is greater than the right one.
[in] | other | The ip_exclude_network_iterator to compare with. |
true
if the left iterator is greater than the right iterator, false
otherwise.
|
inlinenoexcept |
Greater-than-or-equal-to operator.
Compares two ip_exclude_network_iterator to determine if the left one is greater than or equal to the right one.
[in] | other | The ip_exclude_network_iterator to compare with. |
true
if the left iterator is greater than or equal to the right iterator, false
otherwise.