ipaddress 1.1.0
|
A reverse iterator template class for IP addresses. More...
#include <ip-address-iterator.hpp>
Public Member Functions | |
constexpr inline | ip_reverse_iterator () noexcept=default |
Default constructor. | |
constexpr inline | ip_reverse_iterator (Iterator it) noexcept |
Constructs an ip_reverse_iterator from an underlying iterator. | |
constexpr inline uint_type | uint_diff (const ip_reverse_iterator &other) const noexcept |
Calculates the difference in the number of elements between this and another ip_reverse_iterator. | |
constexpr inline iterator_type | base () const noexcept |
Returns the underlying base iterator. | |
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 value_type | operator[] (difference_type n) const noexcept |
Accesses an element by index. | |
constexpr inline value_type | operator[] (const uint_type &n) const noexcept |
Accesses an element by index. | |
constexpr inline ip_reverse_iterator & | operator++ () noexcept |
Pre-increment operator. | |
constexpr inline ip_reverse_iterator | operator++ (int) noexcept |
Post-increment operator. | |
constexpr inline ip_reverse_iterator & | operator-- () noexcept |
Pre-decrement operator. | |
constexpr inline ip_reverse_iterator | operator-- (int) noexcept |
Post-decrement operator. | |
constexpr inline ip_reverse_iterator & | operator+= (difference_type n) noexcept |
Addition assignment operator. | |
constexpr inline ip_reverse_iterator & | operator+= (const uint_type &n) noexcept |
Addition assignment operator. | |
constexpr inline ip_reverse_iterator & | operator-= (difference_type n) noexcept |
Subtraction assignment operator. | |
constexpr inline ip_reverse_iterator & | operator-= (const uint_type &n) noexcept |
Subtraction assignment operator. | |
constexpr inline ip_reverse_iterator | operator+ (difference_type n) const noexcept |
Addition operator. | |
constexpr inline ip_reverse_iterator | operator+ (const uint_type &n) const noexcept |
Addition operator. | |
constexpr inline ip_reverse_iterator | operator- (difference_type n) const noexcept |
Subtraction operator. | |
constexpr inline ip_reverse_iterator | operator- (const uint_type &n) const noexcept |
Subtraction operator. | |
constexpr inline difference_type | operator- (const ip_reverse_iterator &other) const noexcept |
Subtraction operator. | |
constexpr inline bool | operator== (const ip_reverse_iterator &other) const noexcept |
Equality operator. | |
constexpr inline bool | operator!= (const ip_reverse_iterator &other) const noexcept |
Inequality operator. | |
constexpr inline bool | operator< (const ip_reverse_iterator &other) const noexcept |
Less-than operator. | |
constexpr inline bool | operator<= (const ip_reverse_iterator &other) const noexcept |
Less-than-or-equal-to operator. | |
constexpr inline bool | operator> (const ip_reverse_iterator &other) const noexcept |
Greater-than operator. | |
constexpr inline bool | operator>= (const ip_reverse_iterator &other) const noexcept |
Greater-than-or-equal-to operator. | |
A reverse iterator template class for IP addresses.
The ip_reverse_iterator class template provides reverse iteration capabilities over a range of IP addresses. It is designed to work with both IPv4 and IPv6 addresses, allowing for backward traversal of IP address sequences. This class template is particularly useful in scenarios where IP addresses need to be processed in reverse order, such as deallocating IP addresses in a network. The ip_reverse_iterator leverages underlying iterator functionality to provide a robust and flexible mechanism for reverse IP address iteration.
Iterator | The underlying iterator type over which this reverse iterator operates. |
|
defaultnoexcept |
Default constructor.
Constructs an ip_reverse_iterator that points to no object.
|
inlineexplicitnoexcept |
Constructs an ip_reverse_iterator from an underlying iterator.
Creates an ip_reverse_iterator that is the reverse of the given iterator.
[in] | it | The underlying iterator to reverse. |
|
inlinenoexcept |
Calculates the difference in the number of elements between this and another ip_reverse_iterator.
[in] | other | The ip_reverse_iterator to compare with. |
|
inlinenoexcept |
Returns the underlying base iterator.
|
inlinenoexcept |
Returns a reference to the current element.
|
inlinenoexcept |
Returns a pointer to the current element.
|
inlinenoexcept |
Accesses an element by index.
[in] | n | The index of the element. |
|
inlinenoexcept |
Accesses an element by index.
[in] | n | The index of the element. |
|
inlinenoexcept |
Pre-increment operator.
|
inlinenoexcept |
Post-increment operator.
|
inlinenoexcept |
Pre-decrement operator.
|
inlinenoexcept |
Post-decrement operator.
|
inlinenoexcept |
Addition assignment operator.
Moves the iterator forward by n positions.
[in] | n | The number of positions to move the iterator forward. |
|
inlinenoexcept |
Addition assignment operator.
Moves the iterator forward by n positions.
[in] | n | The number of positions to move the iterator forward. |
|
inlinenoexcept |
Subtraction assignment operator.
Moves the iterator backward by n positions.
[in] | n | The number of positions to move the iterator backward. |
|
inlinenoexcept |
Subtraction assignment operator.
Moves the iterator backward by n positions.
[in] | n | The number of positions to move the iterator backward. |
|
inlinenoexcept |
Addition operator.
Creates a new iterator that is n positions ahead of the current one.
[in] | n | The number of positions to move ahead. |
|
inlinenoexcept |
Addition operator.
Creates a new iterator that is n positions ahead of the current one.
[in] | n | The number of positions to move ahead. |
|
inlinenoexcept |
Subtraction operator.
Creates a new iterator that is n positions behind the current one.
[in] | n | The number of positions to move behind. |
|
inlinenoexcept |
Subtraction operator.
Creates a new iterator that is n positions behind the current one.
[in] | n | The number of positions to move behind. |
|
inlinenoexcept |
Subtraction operator.
Calculates the difference in the number of elements between this and another ip_reverse_iterator.
[in] | other | The ip_reverse_iterator to compare with. |
|
inlinenoexcept |
Equality operator.
Compares two ip_reverse_iterators for equality.
[in] | other | The ip_reverse_iterator to compare with. |
true
if the iterators are equal, false
otherwise.
|
inlinenoexcept |
Inequality operator.
Compares two ip_reverse_iterators for inequality.
[in] | other | The ip_reverse_iterator to compare with. |
true
if the iterators are not equal, false
otherwise.
|
inlinenoexcept |
Less-than operator.
Compares two ip_reverse_iterators to determine if the left one is less than the right one.
[in] | other | The ip_reverse_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_reverse_iterators to determine if the left one is less than or equal to the right one.
[in] | other | The ip_reverse_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_reverse_iterators to determine if the left one is greater than the right one.
[in] | other | The ip_reverse_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_reverse_iterators to determine if the left one is greater than or equal to the right one.
[in] | other | The ip_reverse_iterator to compare with. |
true
if the left iterator is greater than or equal to the right iterator, false
otherwise.