ipaddress 1.2.0
Loading...
Searching...
No Matches
summarize_sequence< T, It > Class Template Reference

A container class for iterating over a summarized range of networks. More...

#include <ip-network-iterator.hpp>

Public Types

using value_type = T
 The type of network value.
 
using size_type = size_t
 An unsigned integral type.
 
using difference_type = typename It<value_type>::difference_type
 Unsigned integer type for differences.
 
using pointer = value_type*
 Pointer to the network type.
 
using const_pointer = const value_type*
 Const pointer to the network type.
 
using reference = value_type&
 Reference to the network type.
 
using const_reference = const value_type&
 Const reference to the network type.
 
using iterator = It<value_type>
 Iterator for summarize network range.
 
using const_iterator = It<value_type>
 Const iterator for summarize network range.
 
using ip_address_type = typename value_type::ip_address_type
 The underlying IP address type.
 

Public Member Functions

constexpr inline summarize_sequence () noexcept=default
 Default constructor.
 
constexpr inline summarize_sequence (const ip_address_type &first, const ip_address_type &last) noexcept
 Constructs a summarize_sequence for a given IP address range.
 
constexpr inline const_iterator begin () const noexcept
 Returns an iterator to the beginning of the summarized IP networks.
 
constexpr inline const_iterator end () const noexcept
 Returns an iterator representing the end of the summarized IP networks.
 
constexpr inline const_iterator cbegin () const noexcept
 Returns a constant iterator to the beginning of the summarized IP networks.
 
constexpr inline const_iterator cend () const noexcept
 Returns a constant iterator to the end of the summarized IP networks.
 

Detailed Description

template<typename T, template< typename > class It = ip_summarize_iterator>
class ipaddress::summarize_sequence< T, It >

A container class for iterating over a summarized range of networks.

The iterator traverses the given IP range by summarizing it into the largest possible contiguous IP networks.

Template Parameters
TRepresents the type of the IP network.
ItThe iterator type used for traversing the summarized network range.

Constructor & Destructor Documentation

◆ summarize_sequence()

template<typename T , template< typename > class It = ip_summarize_iterator>
inline summarize_sequence ( const ip_address_type & first,
const ip_address_type & last )
inlinenoexcept

Constructs a summarize_sequence for a given IP address range.

Parameters
[in]firstThe first IP address of the range.
[in]lastThe last IP address of the range.

Member Function Documentation

◆ begin()

template<typename T , template< typename > class It = ip_summarize_iterator>
inline const_iterator begin ( ) const
inlinenodiscardnoexcept

Returns an iterator to the beginning of the summarized IP networks.

Returns
A constant iterator to the first summarized IP network.

◆ end()

template<typename T , template< typename > class It = ip_summarize_iterator>
inline const_iterator end ( ) const
inlinenodiscardnoexcept

Returns an iterator representing the end of the summarized IP networks.

The returned iterator acts as a sentinel marking the completion of the iteration.

Returns
A constant iterator representing one-past-the-end of the range.

◆ cbegin()

template<typename T , template< typename > class It = ip_summarize_iterator>
inline const_iterator cbegin ( ) const
inlinenodiscardnoexcept

Returns a constant iterator to the beginning of the summarized IP networks.

This is equivalent to begin() and provided for STL compatibility.

Returns
A constant iterator to the first summarized IP network.

◆ cend()

template<typename T , template< typename > class It = ip_summarize_iterator>
inline const_iterator cend ( ) const
inlinenodiscardnoexcept

Returns a constant iterator to the end of the summarized IP networks.

This is equivalent to end() and provided for STL compatibility.

Returns
A constant iterator representing the end-of-range.

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