LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc Namespace Reference

For template deduction guides. More...

Namespaces

namespace  ip
 Internal IP address utilities.
 
namespace  literals
 

Classes

class  ArenaWriter
 
class  BufferWriter
 
class  CharSet
 
class  DiscreteRange
 
class  DiscreteSpace
 
class  Errata
 
class  FixedArena
 
class  FixedBufferWriter
 
class  IntrusiveHashMap
 
class  IP4Addr
 
class  IP4Net
 An IPv4 network. More...
 
class  IP4Range
 
class  IP4Srv
 An IPv4 address and host_order_port, modeled on an SRV type for DNS. More...
 
class  IP6Addr
 
class  IP6Net
 IPv6 network. More...
 
class  IP6Range
 Inclusive range of IPv6 addresses. More...
 
class  IP6Srv
 An IPv6 address and host_order_port, modeled on an SRV type for DNS. More...
 
class  IPAddr
 
union  IPEndpoint
 
class  IPMask
 
class  IPNet
 
class  IPRange
 
class  IPRangeSet
 
class  IPRangeView
 
class  IPSpace
 
class  IPSrv
 An IP address and host_order_port, modeled on an SRV type for DNS. More...
 
class  Lexicon
 
class  LocalBufferWriter
 
class  MemArena
 
class  MemSpan
 
class  MemSpan< void >
 
class  MemSpan< void const >
 
class  Rv
 
class  Scalar
 
struct  Spec
 
class  string_view
 STL class. More...
 
class  TextView
 
class  TransformView
 
class  TransformView< void, V >
 
class  Vectray
 

Typedefs

template<typename T>
using unique_malloc = std::unique_ptr<T, detail::malloc_liberator>
 A variant of unique_ptr that handles memory from malloc.
 

Enumerations

enum class  DiscreteRangeRelation : uint8_t {
  NONE , EQUAL , SUBSET , SUPERSET ,
  OVERLAP , ADJACENT
}
 Relationship between two intervals. More...
 
enum class  DiscreteRangeEdgeRelation : uint8_t { NONE , GAP , ADJ , OVLP }
 Relationship between one edge of an interval and the "opposite" edge of another. More...
 

Functions

BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::string_view sv)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, const void *ptr)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, bwf::HexDump const &hex)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, MemSpan< void const > const &span)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, bwf::Errno const &e)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, bwf::Date const &date)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, bwf::Pattern const &pattern)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::error_code const &ec)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, bwf::UnHex const &obj)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, in6_addr const &addr)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, sockaddr const *addr)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP4Addr const &addr)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP6Addr const &addr)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP4Srv const &srv)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP6Srv const &srv)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IPSrv const &srv)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IPAddr const &addr)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP4Range const &range)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP6Range const &range)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IPRange const &range)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IPRangeView const &rv)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP4Net const &net)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IP6Net const &net)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IPNet const &net)
 
BufferWriterbwformat (BufferWriter &w, Spec const &spec, IPMask const &mask)
 
BufferWriterbwformat (BufferWriter &bw, bwf::Spec const &spec, Errata::Severity level)
 
BufferWriterbwformat (BufferWriter &bw, bwf::Spec const &spec, Errata const &errata)
 
std::ostream & operator<< (std::ostream &os, Errata const &err)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, file::path const &p)
 
bool operator== (IPAddr const &lhs, sockaddr const *rhs)
 Equality.
 
intmax_t svtoi (TextView src, TextView *out, int base)
 
uintmax_t svtou (TextView src, TextView *out, int base)
 
double svtod (swoc::TextView text, swoc::TextView *parsed)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, MemSpan< void > const &span)
 
template<typename T>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, MemSpan< T > const &span)
 
template<size_t N>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, const char(&a)[N])
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::nullptr_t)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, const char *v)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::string const &s)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, TextView tv)
 
template<typename X, typename V>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &, TransformView< X, V > &&view)
 
template<typename F>
auto bwformat (BufferWriter &w, bwf::Spec const &spec, F &&f) -> typename std::enable_if< std::is_floating_point_v< typename std::remove_reference_t< F > >, BufferWriter & >::type
 
template<typename I>
auto bwformat (BufferWriter &w, bwf::Spec const &spec, I &&i) -> typename std::enable_if< std::is_unsigned< typename std::remove_reference< I >::type >::value &&std::is_integral< typename std::remove_reference< I >::type >::value, BufferWriter & >::type
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &, char c)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, bool f)
 
template<typename... Args>
std::string & bwprint_v (std::string &s, TextView fmt, std::tuple< Args... > const &args)
 
template<typename... Args>
std::string & bwprint (std::string &s, TextView fmt, Args &&...args)
 
template<typename... Args>
std::string & bwappend (std::string &s, TextView fmt, Args &&...args)
 
template<intmax_t N, typename C, typename T>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, Scalar< N, C, T > const &x)
 
template<typename V>
BufferWriteroperator<< (BufferWriter &w, V &&v)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, BufferWriter const &ww)
 
template<typename... Args>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &, bwf::SubText< Args... > const &subtext)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, IPEndpoint const &addr)
 
template<typename T>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::atomic< T > const &v)
 Format atomics by stripping the atomic and formatting the underlying type.
 
template<size_t N>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &, std::bitset< N > const &bits)
 
template<typename Rep, typename Period>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::chrono::duration< Rep, Period > const &d)
 
template<typename Clock, typename Duration>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::chrono::time_point< Clock, Duration > const &t)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, std::exception const &e)
 
template<typename T>
bool operator== (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
template<typename R>
Rv< typename std::remove_reference< R >::type > MakeRv (R &&r, Errata &&erratum)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, Errata::Annotation const &)
 
bool operator== (IP4Addr const &lhs, IP4Addr const &rhs)
 Equality.
 
bool operator!= (IP4Addr const &lhs, IP4Addr const &rhs)
 
bool operator< (IP4Addr const &lhs, IP4Addr const &rhs)
 
bool operator<= (IP4Addr const &lhs, IP4Addr const &rhs)
 
bool operator> (IP4Addr const &lhs, IP4Addr const &rhs)
 
bool operator>= (IP4Addr const &lhs, IP4Addr const &rhs)
 
bool operator== (IP6Addr const &lhs, IP6Addr const &rhs)
 
bool operator!= (IP6Addr const &lhs, IP6Addr const &rhs)
 
bool operator< (IP6Addr const &lhs, IP6Addr const &rhs)
 
bool operator> (IP6Addr const &lhs, IP6Addr const &rhs)
 
bool operator<= (IP6Addr const &lhs, IP6Addr const &rhs)
 
bool operator>= (IP6Addr const &lhs, IP6Addr const &rhs)
 
bool operator== (IPMask const &lhs, IPMask const &rhs)
 
bool operator!= (IPMask const &lhs, IPMask const &rhs)
 
bool operator< (IPMask const &lhs, IPMask const &rhs)
 
IP4Addr operator& (IP4Addr const &addr, IPMask const &mask)
 
IP4Addr operator| (IP4Addr const &addr, IPMask const &mask)
 
IP6Addr operator& (IP6Addr const &addr, IPMask const &mask)
 
IP6Addr operator| (IP6Addr const &addr, IPMask const &mask)
 
IPAddr operator& (IPAddr const &addr, IPMask const &mask)
 
IPAddr operator| (IPAddr const &addr, IPMask const &mask)
 
bool operator== (sockaddr const *lhs, IPAddr const &rhs)
 Equality.
 
bool operator!= (IPAddr const &lhs, sockaddr const *rhs)
 Inequality.
 
bool operator!= (sockaddr const *lhs, IPAddr const &rhs)
 Inequality.
 
bool operator== (IPAddr const &lhs, IP4Addr const &rhs)
 
bool operator!= (IPAddr const &lhs, IP4Addr const &rhs)
 
bool operator== (IP4Addr const &lhs, IPAddr const &rhs)
 
bool operator!= (IP4Addr const &lhs, IPAddr const &rhs)
 
bool operator== (IPAddr const &lhs, IP6Addr const &rhs)
 
bool operator!= (IPAddr const &lhs, IP6Addr const &rhs)
 
bool operator== (IP6Addr const &lhs, IPAddr const &rhs)
 
bool operator!= (IP6Addr const &lhs, IPAddr const &rhs)
 
bool operator== (IPNet const &lhs, IP4Net const &rhs)
 
bool operator== (IP4Net const &lhs, IPNet const &rhs)
 
bool operator== (IPNet const &lhs, IP6Net const &rhs)
 
bool operator== (IP6Net const &lhs, IPNet const &rhs)
 
bool operator== (IPSrv const &lhs, IP4Srv const &rhs)
 
bool operator== (IP4Srv const &lhs, IPSrv const &rhs)
 
bool operator!= (IPSrv const &lhs, IP4Srv const &rhs)
 
bool operator!= (IP4Srv const &lhs, IPSrv const &rhs)
 
bool operator< (IPSrv const &lhs, IP4Srv const &rhs)
 
bool operator< (IP4Srv const &lhs, IPSrv const &rhs)
 
bool operator<= (IPSrv const &lhs, IP4Srv const &rhs)
 
bool operator<= (IP4Srv const &lhs, IPSrv const &rhs)
 
bool operator> (IPSrv const &lhs, IP4Srv const &rhs)
 
bool operator> (IP4Srv const &lhs, IPSrv const &rhs)
 
bool operator>= (IPSrv const &lhs, IP4Srv const &rhs)
 
bool operator>= (IP4Srv const &lhs, IPSrv const &rhs)
 
bool operator== (IPSrv const &lhs, IP6Srv const &rhs)
 
bool operator== (IP6Srv const &lhs, IPSrv const &rhs)
 
bool operator!= (IPSrv const &lhs, IP6Srv const &rhs)
 
bool operator!= (IP6Srv const &lhs, IPSrv const &rhs)
 
bool operator< (IPSrv const &lhs, IP6Srv const &rhs)
 
bool operator< (IP6Srv const &lhs, IPSrv const &rhs)
 
bool operator<= (IPSrv const &lhs, IP6Srv const &rhs)
 
bool operator<= (IP6Srv const &lhs, IPSrv const &rhs)
 
bool operator> (IPSrv const &lhs, IP6Srv const &rhs)
 
bool operator> (IP6Srv const &lhs, IPSrv const &rhs)
 
bool operator>= (IPSrv const &lhs, IP6Srv const &rhs)
 
bool operator>= (IP6Srv const &lhs, IPSrv const &rhs)
 
bool operator== (IPSrv const &lhs, IP4Addr const &rhs)
 
bool operator== (IP4Addr const &lhs, IPSrv const &rhs)
 
bool operator!= (IPSrv const &lhs, IP4Addr const &rhs)
 
bool operator!= (IP4Addr const &lhs, IPSrv const &rhs)
 
bool operator== (IPSrv const &lhs, IP6Addr const &rhs)
 
bool operator== (IP6Addr const &lhs, IPSrv const &rhs)
 
bool operator!= (IPSrv const &lhs, IP6Addr const &rhs)
 
bool operator!= (IP6Addr const &lhs, IPSrv const &rhs)
 
template<typename E>
size_t Lexicon_Hash (E e)
 
template<typename E>
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, Lexicon< E > const &lex)
 
template<typename T>
int memcmp (MemSpan< T > const &lhs, MemSpan< T > const &rhs)
 
template<typename T>
T * memcpy (MemSpan< T > &dst, MemSpan< T > const &src)
 
template<typename T>
T * memcpy (MemSpan< T > &dst, T *src)
 
template<typename T>
T * memcpy (T *dst, MemSpan< T > &src)
 
char * memcpy (MemSpan< char > &span, std::string_view view)
 
void * memcpy (MemSpan< void > &span, std::string_view view)
 
template<typename T>
MemSpan< T > const & memset (MemSpan< T > const &dst, T const &value)
 
template<typename T, size_t N>
 MemSpan (std::array< T, N > &) -> MemSpan< T >
 Deduction guides.
 
template<typename T, size_t N>
 MemSpan (std::array< T, N > const &) -> MemSpan< T const >
 
template<size_t N>
 MemSpan (char(&)[N]) -> MemSpan< char >
 
template<size_t N>
 MemSpan (char const (&)[N]) -> MemSpan< char const >
 
template<typename T>
 MemSpan (std::vector< T > &) -> MemSpan< T >
 
template<typename T>
 MemSpan (std::vector< T > const &) -> MemSpan< T const >
 
 MemSpan (std::string_view const &) -> MemSpan< char const >
 
 MemSpan (std::string &) -> MemSpan< char >
 
 MemSpan (std::string const &) -> MemSpan< char const >
 
template<typename C>
Scalar_INTERNAL constexpr detail::scalar_unit_round_up_t< C > round_up (C n)
 
template<intmax_t N, typename C, typename T>
constexpr detail::scalar_round_up_t< N, C, T > round_up (Scalar< N, C, T > v)
 
template<typename C>
constexpr detail::scalar_unit_round_down_t< C > round_down (C n)
 
template<intmax_t N, typename C, typename T>
constexpr detail::scalar_round_down_t< N, C, T > round_down (Scalar< N, C, T > v)
 
template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
bool operator< (Scalar< N, C1, T > const &lhs, Scalar< S, I, T > const &rhs)
 
template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
bool operator== (Scalar< N, C1, T > const &lhs, Scalar< S, I, T > const &rhs)
 
template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
bool operator<= (Scalar< N, C1, T > const &lhs, Scalar< S, I, T > const &rhs)
 
template<intmax_t N, typename C, intmax_t S, typename I, typename T>
bool operator> (Scalar< N, C, T > const &lhs, Scalar< S, I, T > const &rhs)
 
template<intmax_t N, typename C, intmax_t S, typename I, typename T>
bool operator>= (Scalar< N, C, T > const &lhs, Scalar< S, I, T > const &rhs)
 
template<intmax_t N, typename C, intmax_t S, typename I, typename T>
auto operator+ (Scalar< N, C, T > lhs, Scalar< S, I, T > const &rhs) -> typename std::common_type< Scalar< N, C, T >, Scalar< S, I, T > >::type
 
template<intmax_t N, typename C, typename T>
Scalar< N, C, T > operator+ (Scalar< N, C, T > const &lhs, Scalar< N, C, T > const &rhs)
 
template<intmax_t N, typename C, intmax_t S, typename I, typename T>
auto operator- (Scalar< N, C, T > lhs, Scalar< S, I, T > const &rhs) -> typename std::common_type< Scalar< N, C, T >, Scalar< S, I, T > >::type
 
template<intmax_t N, typename C, typename T>
Scalar< N, C, T > operator- (Scalar< N, C, T > const &lhs, Scalar< N, C, T > const &rhs)
 
template<intmax_t N, typename C, typename T>
Scalar< N, C, T > operator* (Scalar< N, C, T > const &lhs, C n)
 
template<intmax_t N, typename C, typename T>
Scalar< N, C, T > operator* (C n, Scalar< N, C, T > const &rhs)
 
template<intmax_t N, typename C, typename T>
Scalar< N, C, T > operator* (Scalar< N, C, T > const &lhs, int n)
 
template<intmax_t N, typename C, typename T>
Scalar< N, C, T > operator* (int n, Scalar< N, C, T > const &rhs)
 
template<intmax_t N>
Scalar< N, int > operator* (Scalar< N, int > const &lhs, int n)
 
template<intmax_t N>
Scalar< N, int > operator* (int n, Scalar< N, int > const &rhs)
 
template<intmax_t N, typename C, intmax_t S, typename I, typename T>
auto operator/ (Scalar< N, C, T > lhs, Scalar< S, I, T > rhs) -> typename std::common_type< C, I >::type
 
template<intmax_t N, typename C, typename T, typename I>
Scalar< N, C, T > operator/ (Scalar< N, C, T > lhs, I n)
 
template<intmax_t N, typename C>
round_up (C value)
 
template<intmax_t N, typename C>
round_down (C value)
 
bool operator== (IPAddr const &lhs, IPEndpoint const &rhs)
 
bool operator== (IPEndpoint const &lhs, IPAddr const &rhs)
 Equality.
 
bool operator!= (IPAddr const &lhs, IPEndpoint const &rhs)
 Inequality.
 
bool operator!= (IPEndpoint const &lhs, IPAddr const &rhs)
 Inequality.
 
template<int RADIX>
uintmax_t svto_radix (TextView &src)
 
template<int N>
uintmax_t svto_radix (TextView &&src)
 
template<typename X, typename V>
TransformView< X, V > transform_view_of (X const &xf, V const &src)
 
template<typename T>
bool operator!= (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
template<typename T>
bool operator^ (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
template<typename T>
bool operator< (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
template<typename T>
bool operator<= (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
template<typename T>
bool operator> (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
template<typename T>
bool operator>= (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, sockaddr_in const *addr)
 
BufferWriterbwformat (BufferWriter &w, bwf::Spec const &spec, sockaddr_in6 const *addr)
 

Variables

std::array< swoc::TextView, 3 > Severity_Names
 Default set of severity names.
 
const int8_t svtoi_convert [256]
 

Detailed Description

For template deduction guides.

Typedef Documentation

◆ unique_malloc

template<typename T>
using swoc::unique_malloc = std::unique_ptr<T, detail::malloc_liberator>

A variant of unique_ptr that handles memory from malloc.

Definition at line 1720 of file MemSpan.h.

Enumeration Type Documentation

◆ DiscreteRangeEdgeRelation

enum class swoc::DiscreteRangeEdgeRelation : uint8_t
strong

Relationship between one edge of an interval and the "opposite" edge of another.

Enumerator
NONE 

Edge is on the opposite side of the relating edge.

GAP 

There is a gap between the edges.

ADJ 

The edges are adjacent.

OVLP 

Edge is inside interval.

Definition at line 115 of file DiscreteRange.h.

◆ DiscreteRangeRelation

enum class swoc::DiscreteRangeRelation : uint8_t
strong

Relationship between two intervals.

Enumerator
NONE 

No common elements.

EQUAL 

Identical ranges.

SUBSET 

All elements in LHS are also in RHS.

SUPERSET 

Every element in RHS is in LHS.

OVERLAP 

There exists at least one element in both LHS and RHS.

ADJACENT 

The two intervals are adjacent and disjoint.

Definition at line 105 of file DiscreteRange.h.

Function Documentation

◆ bwappend()

template<typename... Args>
std::string & swoc::bwappend ( std::string & s,
TextView fmt,
Args &&... args )

Generate formatted output to a std::string s using format fmt with arguments args.

Template Parameters
ArgsFormat argument types.
Parameters
sOutput string.
fmtFormat string.
argsArguments for format string.
Returns
s

The output is appended to s without resizing. If s does not have sufficient space for the output it is resized to be sufficient and the output formatted again. The result is that s will contain any previous text and the formatted output.

Definition at line 1203 of file bwf_base.h.

◆ bwformat() [1/52]

BufferWriter & swoc::bwformat ( BufferWriter & bw,
bwf::Spec const & spec,
Errata const & errata )

Definition at line 137 of file Errata.cc.

◆ bwformat() [2/52]

BufferWriter & swoc::bwformat ( BufferWriter & bw,
bwf::Spec const & spec,
Errata::Severity level )

Definition at line 127 of file Errata.cc.

◆ bwformat() [3/52]

template<typename... Args>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & ,
bwf::SubText< Args... > const & subtext )

Output a nested formatted string.

Template Parameters
ArgsArgument pack for subtext.
Parameters
wOutput
subtextFormat string and arguments.
Returns
w

This supports a nested format string and arguments inside another format string. This is most often useful if one of the formats is fixed or pre-compiled.

bwformat(w, "Line {} offset {} with data {}.", line_no, line_off, bwf::SubText("alpha {} bravo {}", alpha, bravo"));
BufferWriter & bwformat(BufferWriter &w, bwf::Spec const &spec, std::string_view sv)
Definition bw_format.cc:649
See also
bwf::Subtext

Definition at line 276 of file bwf_ex.h.

◆ bwformat() [4/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & ,
char c )
inline

Definition at line 1120 of file bwf_base.h.

◆ bwformat() [5/52]

template<size_t N>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & ,
std::bitset< N > const & bits )

Definition at line 31 of file bwf_std.h.

◆ bwformat() [6/52]

template<typename X, typename V>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & ,
TransformView< X, V > && view )

Definition at line 1070 of file bwf_base.h.

◆ bwformat() [7/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
bool f )
inline

Definition at line 1125 of file bwf_base.h.

◆ bwformat() [8/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
BufferWriter const & ww )
inline

Format a buffer writer.

Parameters
wOutput buffer,
specFormat specifier.
wwInput buffer
Returns
w

This treats ww as a view and prints it as text.

Definition at line 1334 of file bwf_base.h.

◆ bwformat() [9/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
bwf::Date const & date )

Format a timestamp wrapped in a Date.

Parameters
wOutput.
specFormat specifier.
dateTimestamp.
Returns
w

Definition at line 855 of file bw_format.cc.

◆ bwformat() [10/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
bwf::Errno const & e )

Format an integer as an errno value.

Parameters
wOutput.
specFormat specifier.
eError code.
Returns
w

Definition at line 826 of file bw_format.cc.

◆ bwformat() [11/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
bwf::HexDump const & hex )

Format a hex dump.

Parameters
wThe output.
specFormat specifier.
hexHex dump wrapper.
Returns
w

Definition at line 695 of file bw_format.cc.

◆ bwformat() [12/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
bwf::Pattern const & pattern )

Repeatedly output a pattern.

Parameters
wOutput.
specFormat specifier.
patternOutput patterning.
Returns
w

The pattern contains the count and text to output.

Definition at line 891 of file bw_format.cc.

◆ bwformat() [13/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
bwf::UnHex const & obj )

Definition at line 926 of file bw_format.cc.

◆ bwformat() [14/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
const char * v )
inline

Definition at line 1046 of file bwf_base.h.

◆ bwformat() [15/52]

template<size_t N>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
const char(&) a[N] )

Definition at line 1034 of file bwf_base.h.

◆ bwformat() [16/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
const void * ptr )

Format non-specialized pointers.

Parameters
wOutput
specFormat specifier.
ptrPointer to format.
Returns
w

Non-specialized pointers are formatted simply as pointers, rather than the pointed to data.

Definition at line 670 of file bw_format.cc.

◆ bwformat() [17/52]

template<typename F>
auto swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
F && f ) -> typename std::enable_if<std::is_floating_point_v<typename std::remove_reference_t<F>>, BufferWriter &>::type

Definition at line 1078 of file bwf_base.h.

◆ bwformat() [18/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
file::path const & p )

Definition at line 478 of file swoc_file.cc.

◆ bwformat() [19/52]

template<typename I>
auto swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
I && i ) -> typename std::enable_if<std::is_unsigned<typename std::remove_reference<I>::type>::value && std::is_integral<typename std::remove_reference<I>::type>::value, BufferWriter &>::type

Definition at line 1097 of file bwf_base.h.

◆ bwformat() [20/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
IPEndpoint const & addr )
inline

Definition at line 70 of file bwf_ip.h.

◆ bwformat() [21/52]

template<typename E>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
Lexicon< E > const & lex )

Definition at line 818 of file Lexicon.h.

◆ bwformat() [22/52]

template<typename T>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
MemSpan< T > const & span )

Definition at line 1022 of file bwf_base.h.

◆ bwformat() [23/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
MemSpan< void > const & span )
inline

Format a generic (void) memory span.

Parameters
wOutput
specFormat specifier.
spanSpan to format.
Returns
w

The format is by default "N:ptr" where N is the size and ptr is a hex formatter pointer. If the format is "x" or "X" the span content is dumped as contiguous hex.

Definition at line 1016 of file bwf_base.h.

◆ bwformat() [24/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
MemSpan< void const > const & span )

Format a generic (void) memory span.

Parameters
wOutput
specFormat specifier.
spanSpan to format.
Returns
w

The format is by default "N:ptr" where N is the size and ptr is a hex formatter pointer. If the format is "x" or "X" the span content is dumped as contiguous hex.

Definition at line 716 of file bw_format.cc.

◆ bwformat() [25/52]

template<intmax_t N, typename C, typename T>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
Scalar< N, C, T > const & x )

Definition at line 1261 of file bwf_base.h.

◆ bwformat() [26/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
sockaddr_in const * addr )
inline

Definition at line 30 of file bwf_ip.h.

◆ bwformat() [27/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
sockaddr_in6 const * addr )
inline

Definition at line 34 of file bwf_ip.h.

◆ bwformat() [28/52]

template<typename T>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::atomic< T > const & v )

Format atomics by stripping the atomic and formatting the underlying type.

Definition at line 23 of file bwf_std.h.

◆ bwformat() [29/52]

template<typename Rep, typename Period>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::chrono::duration< Rep, Period > const & d )

Definition at line 40 of file bwf_std.h.

◆ bwformat() [30/52]

template<typename Clock, typename Duration>
BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::chrono::time_point< Clock, Duration > const & t )

Definition at line 46 of file bwf_std.h.

◆ bwformat() [31/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::error_code const & ec )

Definition at line 904 of file bw_format.cc.

◆ bwformat() [32/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::exception const & e )
inline

Definition at line 51 of file bwf_std.h.

◆ bwformat() [33/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::nullptr_t  )
inline

Definition at line 1040 of file bwf_base.h.

◆ bwformat() [34/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::string const & s )
inline

Definition at line 1059 of file bwf_base.h.

◆ bwformat() [35/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
std::string_view sv )

Output a string_view.

Parameters
wOutput
specFormat specifier
svView to format.
Returns
w

Definition at line 649 of file bw_format.cc.

◆ bwformat() [36/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
bwf::Spec const & spec,
TextView tv )
inline

Definition at line 1064 of file bwf_base.h.

◆ bwformat() [37/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
in6_addr const & addr )

Definition at line 17 of file bw_ip_format.cc.

◆ bwformat() [38/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP4Addr const & addr )

Definition at line 176 of file bw_ip_format.cc.

◆ bwformat() [39/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP4Net const & net )

Definition at line 361 of file bw_ip_format.cc.

◆ bwformat() [40/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP4Range const & range )

Definition at line 299 of file bw_ip_format.cc.

◆ bwformat() [41/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP4Srv const & srv )

Definition at line 214 of file bw_ip_format.cc.

◆ bwformat() [42/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP6Addr const & addr )

Definition at line 209 of file bw_ip_format.cc.

◆ bwformat() [43/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP6Net const & net )

Definition at line 369 of file bw_ip_format.cc.

◆ bwformat() [44/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP6Range const & range )

Definition at line 324 of file bw_ip_format.cc.

◆ bwformat() [45/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IP6Srv const & srv )

Definition at line 223 of file bw_ip_format.cc.

◆ bwformat() [46/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IPAddr const & addr )

Definition at line 246 of file bw_ip_format.cc.

◆ bwformat() [47/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IPMask const & mask )

Definition at line 387 of file bw_ip_format.cc.

◆ bwformat() [48/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IPNet const & net )

Definition at line 377 of file bw_ip_format.cc.

◆ bwformat() [49/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IPRange const & range )

Definition at line 349 of file bw_ip_format.cc.

◆ bwformat() [50/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IPRangeView const & rv )

Definition at line 356 of file bw_ip_format.cc.

◆ bwformat() [51/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
IPSrv const & srv )

Definition at line 236 of file bw_ip_format.cc.

◆ bwformat() [52/52]

BufferWriter & swoc::bwformat ( BufferWriter & w,
Spec const & spec,
sockaddr const * addr )

Definition at line 84 of file bw_ip_format.cc.

◆ bwprint()

template<typename... Args>
std::string & swoc::bwprint ( std::string & s,
TextView fmt,
Args &&... args )

Generate formatted output to a std::string s using format fmt with arguments args.

Template Parameters
ArgsFormat argument types.
Parameters
sOutput string.
fmtFormat string.
argsArguments for format string.
Returns
s

The output is generated to s without resizing, completely replacing any existing text. If s does not have sufficient space for the output it is resized to be sufficient and the output formatted again. The result is that s will contain exactly the formatted output.

Note
This is intended for direct use. For indirect use (as a backend for another class) see the overload that takes an argument tuple.

Definition at line 1185 of file bwf_base.h.

◆ bwprint_v()

template<typename... Args>
std::string & swoc::bwprint_v ( std::string & s,
TextView fmt,
std::tuple< Args... > const & args )

Generate formatted output to a std::string s using format fmt with arguments args.

Template Parameters
ArgsFormat argument types.
Parameters
sOutput string.
fmtFormat string.
argsA tuple of the format arguments.
Returns
s

The output is generated to s as is. If s does not have sufficient space for the output it is resized to be sufficient and the output formatted again. The result is that s will containing exactly the formatted output.

Note
This function is intended for use by other formatting front ends, such as in classes that need to generate formatted output. For direct use there is an overload that takes an argument list.

Definition at line 1156 of file bwf_base.h.

◆ Lexicon_Hash()

template<typename E>
size_t swoc::Lexicon_Hash ( E e)

Policy template use to specify the hash function for the integral type of Lexicon. The default is std::hash but that can be overridden by specializing this method.

Definition at line 61 of file Lexicon.h.

◆ MakeRv()

template<typename R>
Rv< typename std::remove_reference< R >::type > swoc::MakeRv ( R && r,
Errata && erratum )

Combine a function result and status in to an Rv. This is useful for clients that want to declare the status object and result independently.

Parameters
rThe function result
erratumThe pre-existing status object

Definition at line 962 of file Errata.h.

◆ memcmp()

template<typename T>
int swoc::memcmp ( MemSpan< T > const & lhs,
MemSpan< T > const & rhs )

Definition at line 960 of file MemSpan.h.

◆ memcpy() [1/5]

char * swoc::memcpy ( MemSpan< char > & span,
std::string_view view )
inline

Definition at line 1002 of file MemSpan.h.

◆ memcpy() [2/5]

template<typename T>
T * swoc::memcpy ( MemSpan< T > & dst,
MemSpan< T > const & src )

Definition at line 985 of file MemSpan.h.

◆ memcpy() [3/5]

template<typename T>
T * swoc::memcpy ( MemSpan< T > & dst,
T * src )

Definition at line 991 of file MemSpan.h.

◆ memcpy() [4/5]

void * swoc::memcpy ( MemSpan< void > & span,
std::string_view view )
inline

Definition at line 1007 of file MemSpan.h.

◆ memcpy() [5/5]

template<typename T>
T * swoc::memcpy ( T * dst,
MemSpan< T > & src )

Definition at line 997 of file MemSpan.h.

◆ memset()

template<typename T>
MemSpan< T > const & swoc::memset ( MemSpan< T > const & dst,
T const & value )
inline

Set contents of a span to a fixed value.

Template Parameters
TSpan type.
Parameters
dstSpan to change.
valueSource value.
Returns

Definition at line 1022 of file MemSpan.h.

◆ operator!=() [1/20]

bool swoc::operator!= ( IP4Addr const & lhs,
IP4Addr const & rhs )
inline
Returns
true if lhs is equal to rhs.

Definition at line 845 of file IPAddr.h.

◆ operator!=() [2/20]

bool swoc::operator!= ( IP4Addr const & lhs,
IPAddr const & rhs )
inline

Definition at line 1432 of file IPAddr.h.

◆ operator!=() [3/20]

bool swoc::operator!= ( IP4Addr const & lhs,
IPSrv const & rhs )
inline

Definition at line 849 of file IPSrv.h.

◆ operator!=() [4/20]

bool swoc::operator!= ( IP4Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 727 of file IPSrv.h.

◆ operator!=() [5/20]

bool swoc::operator!= ( IP6Addr const & lhs,
IP6Addr const & rhs )
inline
Returns
true if lhs is not equal to rhs.

Definition at line 1062 of file IPAddr.h.

◆ operator!=() [6/20]

bool swoc::operator!= ( IP6Addr const & lhs,
IPAddr const & rhs )
inline

Definition at line 1452 of file IPAddr.h.

◆ operator!=() [7/20]

bool swoc::operator!= ( IP6Addr const & lhs,
IPSrv const & rhs )
inline

Definition at line 869 of file IPSrv.h.

◆ operator!=() [8/20]

bool swoc::operator!= ( IP6Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 787 of file IPSrv.h.

◆ operator!=() [9/20]

bool swoc::operator!= ( IPAddr const & lhs,
IP4Addr const & rhs )
inline

Definition at line 1422 of file IPAddr.h.

◆ operator!=() [10/20]

bool swoc::operator!= ( IPAddr const & lhs,
IP6Addr const & rhs )
inline

Definition at line 1442 of file IPAddr.h.

◆ operator!=() [11/20]

bool swoc::operator!= ( IPAddr const & lhs,
IPEndpoint const & rhs )
inline

Inequality.

Definition at line 40 of file swoc_ip.h.

◆ operator!=() [12/20]

bool swoc::operator!= ( IPAddr const & lhs,
sockaddr const * rhs )
inline

Inequality.

Definition at line 1358 of file IPAddr.h.

◆ operator!=() [13/20]

bool swoc::operator!= ( IPEndpoint const & lhs,
IPAddr const & rhs )
inline

Inequality.

Definition at line 46 of file swoc_ip.h.

◆ operator!=() [14/20]

bool swoc::operator!= ( IPMask const & lhs,
IPMask const & rhs )
inline

Definition at line 1153 of file IPAddr.h.

◆ operator!=() [15/20]

bool swoc::operator!= ( IPSrv const & lhs,
IP4Addr const & rhs )
inline

Definition at line 844 of file IPSrv.h.

◆ operator!=() [16/20]

bool swoc::operator!= ( IPSrv const & lhs,
IP4Srv const & rhs )
inline

Definition at line 722 of file IPSrv.h.

◆ operator!=() [17/20]

bool swoc::operator!= ( IPSrv const & lhs,
IP6Addr const & rhs )
inline

Definition at line 864 of file IPSrv.h.

◆ operator!=() [18/20]

bool swoc::operator!= ( IPSrv const & lhs,
IP6Srv const & rhs )
inline

Definition at line 782 of file IPSrv.h.

◆ operator!=() [19/20]

bool swoc::operator!= ( sockaddr const * lhs,
IPAddr const & rhs )
inline

Inequality.

Definition at line 1364 of file IPAddr.h.

◆ operator&() [1/3]

IP4Addr swoc::operator& ( IP4Addr const & addr,
IPMask const & mask )
inline

Definition at line 1195 of file IPAddr.h.

◆ operator&() [2/3]

IP6Addr swoc::operator& ( IP6Addr const & addr,
IPMask const & mask )
inline

Definition at line 1205 of file IPAddr.h.

◆ operator&() [3/3]

IPAddr swoc::operator& ( IPAddr const & addr,
IPMask const & mask )
inline

Definition at line 1220 of file IPAddr.h.

◆ operator*() [1/6]

template<intmax_t N, typename C, typename T>
Scalar< N, C, T > swoc::operator* ( C n,
Scalar< N, C, T > const & rhs )

Definition at line 933 of file Scalar.h.

◆ operator*() [2/6]

template<intmax_t N, typename C, typename T>
Scalar< N, C, T > swoc::operator* ( int n,
Scalar< N, C, T > const & rhs )

Definition at line 945 of file Scalar.h.

◆ operator*() [3/6]

template<intmax_t N>
Scalar< N, int > swoc::operator* ( int n,
Scalar< N, int > const & rhs )

Definition at line 957 of file Scalar.h.

◆ operator*() [4/6]

template<intmax_t N, typename C, typename T>
Scalar< N, C, T > swoc::operator* ( Scalar< N, C, T > const & lhs,
C n )

Definition at line 927 of file Scalar.h.

◆ operator*() [5/6]

template<intmax_t N, typename C, typename T>
Scalar< N, C, T > swoc::operator* ( Scalar< N, C, T > const & lhs,
int n )

Definition at line 939 of file Scalar.h.

◆ operator*() [6/6]

template<intmax_t N>
Scalar< N, int > swoc::operator* ( Scalar< N, int > const & lhs,
int n )

Definition at line 951 of file Scalar.h.

◆ operator+() [1/2]

template<intmax_t N, typename C, typename T>
Scalar< N, C, T > swoc::operator+ ( Scalar< N, C, T > const & lhs,
Scalar< N, C, T > const & rhs )

Add a two scalars of the same type.

Returns
A scalar of the same type holding the sum.

Definition at line 702 of file Scalar.h.

◆ operator+() [2/2]

template<intmax_t N, typename C, intmax_t S, typename I, typename T>
auto swoc::operator+ ( Scalar< N, C, T > lhs,
Scalar< S, I, T > const & rhs ) -> typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type

Definition at line 693 of file Scalar.h.

◆ operator-() [1/2]

template<intmax_t N, typename C, typename T>
Scalar< N, C, T > swoc::operator- ( Scalar< N, C, T > const & lhs,
Scalar< N, C, T > const & rhs )

Subtract scalars.

Returns
A scalar of the same type holding the difference lhs - rhs

Definition at line 819 of file Scalar.h.

◆ operator-() [2/2]

template<intmax_t N, typename C, intmax_t S, typename I, typename T>
auto swoc::operator- ( Scalar< N, C, T > lhs,
Scalar< S, I, T > const & rhs ) -> typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type

Definition at line 810 of file Scalar.h.

◆ operator/() [1/2]

template<intmax_t N, typename C, typename T, typename I>
Scalar< N, C, T > swoc::operator/ ( Scalar< N, C, T > lhs,
I n )

Definition at line 977 of file Scalar.h.

◆ operator/() [2/2]

template<intmax_t N, typename C, intmax_t S, typename I, typename T>
auto swoc::operator/ ( Scalar< N, C, T > lhs,
Scalar< S, I, T > rhs ) -> typename std::common_type<C, I>::type

Definition at line 970 of file Scalar.h.

◆ operator<() [1/9]

bool swoc::operator< ( IP4Addr const & lhs,
IP4Addr const & rhs )
inline
Returns
true if lhs is less than rhs (host order).

Definition at line 850 of file IPAddr.h.

◆ operator<() [2/9]

bool swoc::operator< ( IP4Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 736 of file IPSrv.h.

◆ operator<() [3/9]

bool swoc::operator< ( IP6Addr const & lhs,
IP6Addr const & rhs )
inline
Returns
true if lhs is less than rhs.

Definition at line 1068 of file IPAddr.h.

◆ operator<() [4/9]

bool swoc::operator< ( IP6Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 796 of file IPSrv.h.

◆ operator<() [5/9]

bool swoc::operator< ( IPMask const & lhs,
IPMask const & rhs )
inline

Definition at line 1157 of file IPAddr.h.

◆ operator<() [6/9]

bool swoc::operator< ( IPSrv const & lhs,
IP4Srv const & rhs )
inline

Definition at line 731 of file IPSrv.h.

◆ operator<() [7/9]

bool swoc::operator< ( IPSrv const & lhs,
IP6Srv const & rhs )
inline

Definition at line 791 of file IPSrv.h.

◆ operator<() [8/9]

template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
bool swoc::operator< ( Scalar< N, C1, T > const & lhs,
Scalar< S, I, T > const & rhs )

Definition at line 607 of file Scalar.h.

◆ operator<<() [1/2]

template<typename V>
BufferWriter & swoc::operator<< ( BufferWriter & w,
V && v )

Definition at line 1271 of file bwf_base.h.

◆ operator<<() [2/2]

std::ostream & swoc::operator<< ( std::ostream & os,
Errata const & err )

Definition at line 173 of file Errata.cc.

◆ operator<=() [1/8]

bool swoc::operator<= ( IP4Addr const & lhs,
IP4Addr const & rhs )
inline
Returns
true if lhs is less than or equal torhs (host order).

Definition at line 856 of file IPAddr.h.

◆ operator<=() [2/8]

bool swoc::operator<= ( IP4Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 746 of file IPSrv.h.

◆ operator<=() [3/8]

bool swoc::operator<= ( IP6Addr const & lhs,
IP6Addr const & rhs )
inline
Returns
true if lhs is less than or equal to rhs.

Definition at line 1082 of file IPAddr.h.

◆ operator<=() [4/8]

bool swoc::operator<= ( IP6Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 806 of file IPSrv.h.

◆ operator<=() [5/8]

bool swoc::operator<= ( IPSrv const & lhs,
IP4Srv const & rhs )
inline

Definition at line 741 of file IPSrv.h.

◆ operator<=() [6/8]

bool swoc::operator<= ( IPSrv const & lhs,
IP6Srv const & rhs )
inline

Definition at line 801 of file IPSrv.h.

◆ operator<=() [7/8]

template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
bool swoc::operator<= ( Scalar< N, C1, T > const & lhs,
Scalar< S, I, T > const & rhs )

Definition at line 621 of file Scalar.h.

◆ operator==() [1/25]

template<typename T>
bool swoc::operator== ( DiscreteRange< T > const & lhs,
DiscreteRange< T > const & rhs )

Definition at line 622 of file DiscreteRange.h.

◆ operator==() [2/25]

bool swoc::operator== ( IP4Addr const & lhs,
IP4Addr const & rhs )
inline

Equality.

Definition at line 839 of file IPAddr.h.

◆ operator==() [3/25]

bool swoc::operator== ( IP4Addr const & lhs,
IPAddr const & rhs )
inline

Definition at line 1427 of file IPAddr.h.

◆ operator==() [4/25]

bool swoc::operator== ( IP4Addr const & lhs,
IPSrv const & rhs )
inline

Definition at line 839 of file IPSrv.h.

◆ operator==() [5/25]

bool swoc::operator== ( IP4Net const & lhs,
IPNet const & rhs )
inline

Definition at line 2267 of file IPRange.h.

◆ operator==() [6/25]

bool swoc::operator== ( IP4Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 717 of file IPSrv.h.

◆ operator==() [7/25]

bool swoc::operator== ( IP6Addr const & lhs,
IP6Addr const & rhs )
inline
Returns
true if lhs is equal to rhs.

Definition at line 1055 of file IPAddr.h.

◆ operator==() [8/25]

bool swoc::operator== ( IP6Addr const & lhs,
IPAddr const & rhs )
inline

Definition at line 1447 of file IPAddr.h.

◆ operator==() [9/25]

bool swoc::operator== ( IP6Addr const & lhs,
IPSrv const & rhs )
inline

Definition at line 859 of file IPSrv.h.

◆ operator==() [10/25]

bool swoc::operator== ( IP6Net const & lhs,
IPNet const & rhs )
inline

Definition at line 2277 of file IPRange.h.

◆ operator==() [11/25]

bool swoc::operator== ( IP6Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 777 of file IPSrv.h.

◆ operator==() [12/25]

bool swoc::operator== ( IPAddr const & lhs,
IP4Addr const & rhs )
inline

Definition at line 1417 of file IPAddr.h.

◆ operator==() [13/25]

bool swoc::operator== ( IPAddr const & lhs,
IP6Addr const & rhs )
inline

Definition at line 1437 of file IPAddr.h.

◆ operator==() [14/25]

bool swoc::operator== ( IPAddr const & lhs,
IPEndpoint const & rhs )
inline

Definition at line 28 of file swoc_ip.h.

◆ operator==() [15/25]

bool swoc::operator== ( IPAddr const & lhs,
sockaddr const * sa )

Equality.

Definition at line 650 of file swoc_ip.cc.

◆ operator==() [16/25]

bool swoc::operator== ( IPEndpoint const & lhs,
IPAddr const & rhs )
inline

Equality.

Definition at line 34 of file swoc_ip.h.

◆ operator==() [17/25]

bool swoc::operator== ( IPMask const & lhs,
IPMask const & rhs )
inline

Definition at line 1148 of file IPAddr.h.

◆ operator==() [18/25]

bool swoc::operator== ( IPNet const & lhs,
IP4Net const & rhs )
inline

Definition at line 2262 of file IPRange.h.

◆ operator==() [19/25]

bool swoc::operator== ( IPNet const & lhs,
IP6Net const & rhs )
inline

Definition at line 2272 of file IPRange.h.

◆ operator==() [20/25]

bool swoc::operator== ( IPSrv const & lhs,
IP4Addr const & rhs )
inline

Definition at line 834 of file IPSrv.h.

◆ operator==() [21/25]

bool swoc::operator== ( IPSrv const & lhs,
IP4Srv const & rhs )
inline

Definition at line 712 of file IPSrv.h.

◆ operator==() [22/25]

bool swoc::operator== ( IPSrv const & lhs,
IP6Addr const & rhs )
inline

Definition at line 854 of file IPSrv.h.

◆ operator==() [23/25]

bool swoc::operator== ( IPSrv const & lhs,
IP6Srv const & rhs )
inline

Definition at line 772 of file IPSrv.h.

◆ operator==() [24/25]

template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
bool swoc::operator== ( Scalar< N, C1, T > const & lhs,
Scalar< S, I, T > const & rhs )

Definition at line 615 of file Scalar.h.

◆ operator==() [25/25]

bool swoc::operator== ( sockaddr const * lhs,
IPAddr const & rhs )
inline

Equality.

Definition at line 1352 of file IPAddr.h.

◆ operator>() [1/8]

bool swoc::operator> ( IP4Addr const & lhs,
IP4Addr const & rhs )
inline
Returns
true if lhs is greater than rhs (host order).

Definition at line 863 of file IPAddr.h.

◆ operator>() [2/8]

bool swoc::operator> ( IP4Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 757 of file IPSrv.h.

◆ operator>() [3/8]

bool swoc::operator> ( IP6Addr const & lhs,
IP6Addr const & rhs )
inline
Returns
true if lhs is greater than rhs.

Definition at line 1077 of file IPAddr.h.

◆ operator>() [4/8]

bool swoc::operator> ( IP6Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 817 of file IPSrv.h.

◆ operator>() [5/8]

bool swoc::operator> ( IPSrv const & lhs,
IP4Srv const & rhs )
inline

Definition at line 752 of file IPSrv.h.

◆ operator>() [6/8]

bool swoc::operator> ( IPSrv const & lhs,
IP6Srv const & rhs )
inline

Definition at line 812 of file IPSrv.h.

◆ operator>() [7/8]

template<intmax_t N, typename C, intmax_t S, typename I, typename T>
bool swoc::operator> ( Scalar< N, C, T > const & lhs,
Scalar< S, I, T > const & rhs )

Definition at line 630 of file Scalar.h.

◆ operator>=() [1/8]

bool swoc::operator>= ( IP4Addr const & lhs,
IP4Addr const & rhs )
inline
Returns
true if lhs is greater than or equal to rhs (host order).

Definition at line 869 of file IPAddr.h.

◆ operator>=() [2/8]

bool swoc::operator>= ( IP4Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 767 of file IPSrv.h.

◆ operator>=() [3/8]

bool swoc::operator>= ( IP6Addr const & lhs,
IP6Addr const & rhs )
inline
Returns
true if lhs is greater than or equal to rhs.

Definition at line 1091 of file IPAddr.h.

◆ operator>=() [4/8]

bool swoc::operator>= ( IP6Srv const & lhs,
IPSrv const & rhs )
inline

Definition at line 827 of file IPSrv.h.

◆ operator>=() [5/8]

bool swoc::operator>= ( IPSrv const & lhs,
IP4Srv const & rhs )
inline

Definition at line 762 of file IPSrv.h.

◆ operator>=() [6/8]

bool swoc::operator>= ( IPSrv const & lhs,
IP6Srv const & rhs )
inline

Definition at line 822 of file IPSrv.h.

◆ operator>=() [7/8]

template<intmax_t N, typename C, intmax_t S, typename I, typename T>
bool swoc::operator>= ( Scalar< N, C, T > const & lhs,
Scalar< S, I, T > const & rhs )

Definition at line 636 of file Scalar.h.

◆ operator|() [1/3]

IP4Addr swoc::operator| ( IP4Addr const & addr,
IPMask const & mask )
inline

Definition at line 1200 of file IPAddr.h.

◆ operator|() [2/3]

IP6Addr swoc::operator| ( IP6Addr const & addr,
IPMask const & mask )
inline

Definition at line 1210 of file IPAddr.h.

◆ operator|() [3/3]

IPAddr swoc::operator| ( IPAddr const & addr,
IPMask const & mask )
inline

Definition at line 1225 of file IPAddr.h.

◆ round_down() [1/3]

template<typename C>
detail::scalar_unit_round_down_t< C > swoc::round_down ( C n)
constexpr

Prepare units n to be assigned to a Scalar, rounding down as needed.

Template Parameters
CThe type of the value.
Parameters
nThe value.
Returns
An unspecified type suitable to be assigned to a Scalar.

Definition at line 585 of file Scalar.h.

◆ round_down() [2/3]

template<intmax_t N, typename C>
C swoc::round_down ( C value)

Explicitly round value to a multiple of N.

Template Parameters
N[explicit] Rounding unit.
C[deduced] Base type of value.
Parameters
valueValue to round.
Returns
The largest multiple of N that is not greater than value.
int r = swoc::round_down<10>(119); // r becomes 110.
int r = swoc::round_down<10>(120); // r becomes 120.
int r = swoc::round_down<10>(121); // r becomes 120.
constexpr detail::scalar_unit_round_down_t< C > round_down(C n)
Definition Scalar.h:585

Definition at line 1034 of file Scalar.h.

◆ round_down() [3/3]

template<intmax_t N, typename C, typename T>
detail::scalar_round_down_t< N, C, T > swoc::round_down ( Scalar< N, C, T > v)
constexpr

Prepare a Scalar instance to be assigned to another Scalar, rounding down as needed.

Template Parameters
NScalar scale value.
CScalar internal storage type.
TScalar tag.
Parameters
vThe Scalar value.
Returns

Definition at line 599 of file Scalar.h.

◆ round_up() [1/3]

template<typename C>
Scalar_INTERNAL constexpr detail::scalar_unit_round_up_t< C > swoc::round_up ( C n)
constexpr

Prepare units n to be assigned to a Scalar, rounding up as needed.

Template Parameters
CThe type of the value.
Parameters
nThe value.
Returns
An unspecified type suitable to be assigned to a Scalar.

Definition at line 559 of file Scalar.h.

◆ round_up() [2/3]

template<intmax_t N, typename C>
C swoc::round_up ( C value)

Explicitly round value up to a multiple of N.

Template Parameters
N[explicit] Rounding unit.
C[deduced] Base type of value.
Parameters
valueValue to round.
Returns
The smallest multiple of N that is at least as large as value.
int r = swoc::round_up<10>(119); // r becomes 120.
int r = swoc::round_up<10>(120); // r becomes 120.
int r = swoc::round_up<10>(121); // r becomes 130.
Scalar_INTERNAL constexpr detail::scalar_unit_round_up_t< C > round_up(C n)
Definition Scalar.h:559

Definition at line 1015 of file Scalar.h.

◆ round_up() [3/3]

template<intmax_t N, typename C, typename T>
detail::scalar_round_up_t< N, C, T > swoc::round_up ( Scalar< N, C, T > v)
constexpr

Prepare a Scalar instance to be assigned to another Scalar, rounding up as needed.

Template Parameters
NScalar scale value.
CScalar internal storage type.
TScalar tag.
Parameters
vThe Scalar value.
Returns

Definition at line 573 of file Scalar.h.

◆ svto_radix() [1/2]

template<int N>
uintmax_t swoc::svto_radix ( TextView && src)

Convenience overload.

See also
svto_radix(swoc::TextView &src)

Definition at line 1081 of file TextView.h.

◆ svto_radix() [2/2]

template<int RADIX>
uintmax_t swoc::svto_radix ( TextView & src)

Convert the text in src to an unsigned numeric value.

Template Parameters
NThe radix (must be 1..36)
Parameters
srcThe source text. Updated during parsing.
Returns
The converted numeric value.

This is a specialized function useful only where conversion performance is critical. It is used inside svtoi and svtou for the common cases of 8, 10, and 16, therefore normally this isn't much more performant in those cases than just svtoi. Because of this only positive values are parsed. If determining the radix from the text or signed value parsing is needed, used svtoi.

src is updated in place to indicate what characters were parsed by removing them from the view Parsing stops on the first invalid digit, so any leading non-digit characters (e.g. whitespace) must already be removed. For overflow, all valid digits are consumed and the maximum value returned.

Definition at line 1059 of file TextView.h.

◆ svtod()

double swoc::svtod ( TextView text,
TextView * parsed = nullptr )

Parse text as a floating point number.

Parameters
textThe input text.
parsedParsed text [out]
Returns
The floating point value, or 0.0 if invalid input.

If parsed is not nullptr then the span of characters parsed is put there. This can be used to check if the parse was scuccesful - on a failed parse, it will be empty.

Note
This should be within 1 epsilon of correct, although it doesn't guarantee picking the closest epsilon. It's more than sufficient for use in configurations, but possibly not for high precision work.

Definition at line 154 of file TextView.cc.

◆ svtoi()

intmax_t swoc::svtoi ( TextView src,
TextView * parsed = nullptr,
int base = 0 )

Convert the text in TextView src to a signed numeric value.

If parsed is non-null then the part of the string actually parsed is placed there. base sets the conversion base. If not set base 10 is used with two special cases:

  • If the number starts with a literal '0' then it is treated as base 8.
  • If the number starts with the literal characters '0x' or '0X' then it is treated as base 16.

If base is explicitly set then any leading radix indicator is not supported.

Definition at line 45 of file TextView.cc.

◆ svtou()

uintmax_t swoc::svtou ( TextView src,
TextView * parsed = nullptr,
int base = 0 )

Convert the text in TextView src to an unsigned numeric value.

If parsed is non-null then the part of the string actually parsed is placed there. base sets the conversion base. If not set base 10 is used with two special cases:

  • If the number starts with a literal '0' then it is treated as base 8.
  • If the number starts with the literal characters '0x' or '0X' then it is treated as base 16.

If base is explicitly set then any leading radix indicator is not supported.

Definition at line 81 of file TextView.cc.

◆ transform_view_of()

template<typename X, typename V>
TransformView< X, V > swoc::transform_view_of ( X const & xf,
V const & src )

Create a transformed view of a source.

Template Parameters
XThe transform functor type.
VThe source type.
Parameters
xfThe transform.
srcThe view source.
Returns
A TransformView that applies xf to src.

Definition at line 1933 of file TextView.h.

Variable Documentation

◆ Severity_Names

std::array<swoc::TextView, 3> swoc::Severity_Names
Initial value:
{
{"Info", "Warning", "Error"}
}

Default set of severity names.

Definition at line 43 of file Errata.cc.

◆ svtoi_convert

const int8_t swoc::svtoi_convert[256]
extern

Internal table of digit values for characters. This is -1 for characters that are not valid digits.