LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::IP6Range::NetSource Class Reference

#include <IPRange.h>

Collaboration diagram for swoc::IP6Range::NetSource:
Collaboration graph

Public Types

using range_type = IP6Range
 Import base range type.
 
using iterator = self_type
 This class acts as a container and an iterator.
 
using const_iterator = iterator
 All iteration is constant so no distinction between iterators.
 

Public Member Functions

 NetSource (range_type const &range)
 Construct from range.
 
 NetSource (self_type const &that)=default
 Copy constructor.
 
iterator begin () const
 First network.
 
iterator end () const
 Past last network.
 
bool empty () const
 
IP6Net operator* () const
 
self_typeoperator-> ()
 Access this as if it were an IP6Net.
 
IP6Addr const & addr () const
 
IPMask mask () const
 
self_typeoperator++ ()
 Move to next network.
 
self_type operator++ (int)
 Move to next network.
 
bool operator== (self_type const &that) const
 Equality.
 
bool operator!= (self_type const &that) const
 Inequality.
 

Protected Member Functions

void search_wider ()
 
void search_narrower ()
 
bool is_valid (IPMask const &mask)
 

Protected Attributes

IP6Range _range
 Remaining range.
 
IPMask _mask {IP6Addr::WIDTH}
 Current CIDR value.
 

Detailed Description

Network generator class. This generates networks from a range and acts as both a forward iterator and a container.

See also
IP6Range::networks

Definition at line 261 of file IPRange.h.

Member Typedef Documentation

◆ const_iterator

All iteration is constant so no distinction between iterators.

Definition at line 275 of file IPRange.h.

◆ iterator

This class acts as a container and an iterator.

Definition at line 273 of file IPRange.h.

◆ range_type

Import base range type.

Definition at line 264 of file IPRange.h.

Constructor & Destructor Documentation

◆ NetSource()

swoc::IP6Range::NetSource::NetSource ( range_type const & range)
explicit

Construct from range.

Definition at line 1200 of file swoc_ip.cc.

Member Function Documentation

◆ addr()

IP6Addr const & swoc::IP6Range::NetSource::addr ( ) const
inline
Returns
The current network address.

Definition at line 2390 of file IPRange.h.

◆ begin()

auto swoc::IP6Range::NetSource::begin ( ) const
inline

First network.

Definition at line 2350 of file IPRange.h.

◆ empty()

bool swoc::IP6Range::NetSource::empty ( ) const
inline
Returns
true if there are valid networks, false if not.

Definition at line 2360 of file IPRange.h.

◆ end()

auto swoc::IP6Range::NetSource::end ( ) const
inline

Past last network.

Definition at line 2355 of file IPRange.h.

◆ is_valid()

bool swoc::IP6Range::NetSource::is_valid ( IPMask const & mask)
inlineprotected

Definition at line 2375 of file IPRange.h.

◆ mask()

IPMask swoc::IP6Range::NetSource::mask ( ) const
inline

Iterator support.

Returns
The current network mask.

Definition at line 2395 of file IPRange.h.

◆ operator!=()

bool swoc::IP6Range::NetSource::operator!= ( self_type const & that) const
inline

Inequality.

Definition at line 2385 of file IPRange.h.

◆ operator*()

IP6Net swoc::IP6Range::NetSource::operator* ( ) const
inline
Returns
The current network.

Definition at line 2365 of file IPRange.h.

◆ operator++()

auto swoc::IP6Range::NetSource::operator++ ( )

Move to next network.

Definition at line 1207 of file swoc_ip.cc.

◆ operator->()

auto swoc::IP6Range::NetSource::operator-> ( )
inline

Access this as if it were an IP6Net.

Definition at line 2370 of file IPRange.h.

◆ operator==()

bool swoc::IP6Range::NetSource::operator== ( self_type const & that) const
inline

Equality.

Definition at line 2380 of file IPRange.h.

◆ search_narrower()

void swoc::IP6Range::NetSource::search_narrower ( )
protected

Definition at line 1237 of file swoc_ip.cc.

◆ search_wider()

void swoc::IP6Range::NetSource::search_wider ( )
protected

Definition at line 1224 of file swoc_ip.cc.

Member Data Documentation

◆ _mask

IPMask swoc::IP6Range::NetSource::_mask {IP6Addr::WIDTH}
protected

Current CIDR value.

Definition at line 310 of file IPRange.h.

◆ _range

IP6Range swoc::IP6Range::NetSource::_range
protected

Remaining range.

Definition at line 309 of file IPRange.h.


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