|
LibSWOC++ 1.5.14
Solid Wall of C++
|
#include <IPRange.h>

Public Member Functions | |
| IPRangeView ()=default | |
| Default constructor - invalid view. | |
| bool | operator== (IPRange const &r) const |
| Compare to a range. | |
| bool | valid () const |
| bool | empty () const |
| self_type & | clear () |
| Reset to invalid view. | |
| self_type & | assign (IP4Range const &r) |
| Update the view. | |
| self_type & | assign (IP6Range const &r) |
| Update the view. | |
| bool | is_ip4 () const |
| bool | is_ip6 () const |
| bool | is (sa_family_t family) const |
| bool | contains (IPAddr const &addr) const |
| bool | contains (IP6Addr const &addr) const |
| bool | contains (IP4Addr const &addr) const |
| IP4Range const & | ip4 () const |
| IP6Range const & | ip6 () const |
| IPAddr | min () const |
| IPAddr | max () const |
| bool | operator== (self_type const &that) const |
| Equality. | |
| bool | operator!= (self_type const &that) const |
| Inequality. | |
| IPRange::NetSource | networks () const |
Protected Attributes | |
| storage_type | _raw = {std::monostate()} |
| Storage for the view pointer. | |
| sa_family_t | _family = AF_UNSPEC |
| Range address family. | |
View of a range.
The point of this is IPRange is really a union on top of IP4Range and IP6Range therefore using it requires copying. A view enable using an IPv4 or IPv6 range as a generic range without the copy. This is useful in situations where performance is critical.
Used primarily for iterator implementation where the ranges are stored in family specific ranges in the container. The iterator can use this to provide access as an IPRange without a copying every iteration.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Generate a list of networks covering this range.
|
inline |
| bool swoc::IPRangeView::operator== | ( | IPRange const & | r | ) | const |
Compare to a range.
Definition at line 1244 of file swoc_ip.cc.
| bool swoc::IPRangeView::operator== | ( | IPRangeView::self_type const & | that | ) | const |
Equality.
Definition at line 1257 of file swoc_ip.cc.
|
inline |
|
protected |
|
protected |