ipaddress 1.1.0
|
A sequence of host IP addresses. More...
#include <ip-any-iterator.hpp>
Public Types | |
using | value_type = ip_address |
The type of the IP addresses in the sequence. | |
using | size_type = size_t |
The type used for representing the size of the sequence. | |
using | difference_type = uint128_t |
The type used for representing differences between iterators. | |
using | pointer = value_type* |
The pointer type for the value_type. | |
using | const_pointer = const value_type* |
The const pointer type for the value_type. | |
using | reference = value_type& |
The reference type for the value_type. | |
using | const_reference = const value_type& |
The const reference type for the value_type. | |
using | iterator = ip_any_iterator<value_type, ip_address_iterator<ipv4_address>, ip_address_iterator<ipv6_address>> |
The iterator type for iterating over the sequence. | |
using | const_iterator = iterator |
The const iterator type for iterating over the sequence. | |
using | reverse_iterator = ip_reverse_iterator<iterator> |
The reverse iterator type for iterating over the sequence in reverse. | |
using | const_reverse_iterator = ip_reverse_iterator<const_iterator> |
The const reverse iterator type for iterating over the sequence in reverse. | |
Public Member Functions | |
constexpr inline | hosts_any_sequence (ip_address_iterator< ipv4_address > begin, ip_address_iterator< ipv4_address > end) noexcept |
Constructs a hosts_any_sequence with specified network parameters. | |
constexpr inline | hosts_any_sequence (ip_address_iterator< ipv6_address > begin, ip_address_iterator< ipv6_address > end) noexcept |
Constructs a hosts_any_sequence with specified network parameters. | |
constexpr inline const_iterator | begin () const noexcept |
Gets the beginning iterator of the sequence. | |
constexpr inline const_iterator | end () const noexcept |
Gets the end iterator of the sequence. | |
constexpr inline const_reverse_iterator | rbegin () const noexcept |
Gets the beginning reverse iterator of the sequence. | |
constexpr inline const_reverse_iterator | rend () const noexcept |
Gets the end reverse iterator of the sequence. | |
constexpr inline const_iterator | cbegin () const noexcept |
Gets the beginning const iterator of the sequence. | |
constexpr inline const_iterator | cend () const noexcept |
Gets the end const iterator of the sequence. | |
constexpr inline const_reverse_iterator | crbegin () const noexcept |
Gets the beginning const reverse iterator of the sequence. | |
constexpr inline const_reverse_iterator | crend () const noexcept |
Gets the end const reverse iterator of the sequence. | |
constexpr inline bool | empty () const noexcept |
Checks if the sequence is empty. | |
constexpr inline difference_type | size () const noexcept |
Gets the size of the sequence. | |
constexpr inline value_type | operator[] (difference_type n) const noexcept |
Accesses an element by index. | |
constexpr inline value_type | at (difference_type n) const noexcept |
Accesses an element by index with bounds checking. | |
constexpr inline value_type | front () const noexcept |
Accesses the first element in the sequence. | |
constexpr inline value_type | back () const noexcept |
Accesses the last element in the sequence. | |
A sequence of host IP addresses.
The subnets_any_sequence class template to provide a container-like interface for IP address sequences. It allows for iteration over the host addresses in a network or subnet, excluding the network and broadcast addresses when appropriate. This specialization is essential for network-related operations that require processing of individual host addresses within a given range.
Base | The base type from which the ip_address_base is derived, representing the underlying IP address type. |
using iterator = ip_any_iterator<value_type, ip_address_iterator<ipv4_address>, ip_address_iterator<ipv6_address>> |
The iterator type for iterating over the sequence.
using const_iterator = iterator |
The const iterator type for iterating over the sequence.
|
inlinenoexcept |
Constructs a hosts_any_sequence with specified network parameters.
[in] | begin | The begin ipv4 address iterator. |
[in] | end | The end ipv4 address iterator. |
|
inlinenoexcept |
Constructs a hosts_any_sequence with specified network parameters.
[in] | begin | The begin ipv6 address iterator. |
[in] | end | The end ipv6 address iterator. |
|
inlinenoexcept |
Gets the beginning iterator of the sequence.
|
inlinenoexcept |
Gets the end iterator of the sequence.
|
inlinenoexcept |
Gets the beginning reverse iterator of the sequence.
|
inlinenoexcept |
Gets the end reverse iterator of the sequence.
|
inlinenoexcept |
Gets the beginning const iterator of the sequence.
|
inlinenoexcept |
Gets the end const iterator of the sequence.
|
inlinenoexcept |
Gets the beginning const reverse iterator of the sequence.
|
inlinenoexcept |
Gets the end const reverse iterator of the sequence.
|
inlinenoexcept |
Checks if the sequence is empty.
true
if the sequence is empty, false
otherwise.
|
inlinenoexcept |
Gets the size of the sequence.
|
inlinenoexcept |
Accesses an element by index.
[in] | n | The index of the element. |
|
inlinenoexcept |
Accesses an element by index with bounds checking.
[in] | n | The index of the element. |
|
inlinenoexcept |
Accesses the first element in the sequence.
|
inlinenoexcept |
Accesses the last element in the sequence.