Upa URL C++ library
A WHATWG URL Standard implementation
Loading...
Searching...
No Matches
upa::code_point_set Class Reference

Represents code point set. More...

#include <upa/url_percent_encode.h>

Public Member Functions

constexpr code_point_set (void(*fun)(code_point_set &self))
 constructor for code point set initialization
constexpr void copy (const code_point_set &other)
 copy code points from other set
constexpr void exclude (std::uint8_t c)
 exclude c code point from set
constexpr void include (std::uint8_t c)
 include c code point to set
constexpr void exclude (std::initializer_list< std::uint8_t > clist)
 exclude list of code points from set
constexpr void include (std::initializer_list< std::uint8_t > clist)
 include code points from list
constexpr void include (std::uint8_t from, std::uint8_t to)
 include range of code points to set
template<typename CharT>
constexpr bool operator[] (CharT c) const
 test code point set contains code point c

Detailed Description

Represents code point set.

Is used to define percent encode sets, forbidden host code points, and other code point sets.

Definition at line 37 of file url_percent_encode.h.

Constructor & Destructor Documentation

◆ code_point_set()

upa::code_point_set::code_point_set ( void(* fun )(code_point_set &self))
inlineexplicitconstexpr

constructor for code point set initialization

Function fun must iniatialize self object by using code_point_set member functions: copy(), exclude(), and include().

Parameters
[in]funconstexpr function to initialize code point set elements

Definition at line 45 of file url_percent_encode.h.

Member Function Documentation

◆ copy()

void upa::code_point_set::copy ( const code_point_set & other)
inlineconstexpr

copy code points from other set

Parameters
[in]othercode point set to copy from

Definition at line 51 of file url_percent_encode.h.

◆ exclude() [1/2]

void upa::code_point_set::exclude ( std::initializer_list< std::uint8_t > clist)
inlineconstexpr

exclude list of code points from set

Parameters
[in]clistlist of code points to exclude

Definition at line 69 of file url_percent_encode.h.

◆ exclude() [2/2]

void upa::code_point_set::exclude ( std::uint8_t c)
inlineconstexpr

exclude c code point from set

Parameters
[in]ccode point to exclude

Definition at line 57 of file url_percent_encode.h.

◆ include() [1/3]

void upa::code_point_set::include ( std::initializer_list< std::uint8_t > clist)
inlineconstexpr

include code points from list

Parameters
[in]clistlist of code points to include

Definition at line 76 of file url_percent_encode.h.

◆ include() [2/3]

void upa::code_point_set::include ( std::uint8_t c)
inlineconstexpr

include c code point to set

Parameters
[in]ccode point to include

Definition at line 63 of file url_percent_encode.h.

◆ include() [3/3]

void upa::code_point_set::include ( std::uint8_t from,
std::uint8_t to )
inlineconstexpr

include range of code points to set

Parameters
[in]from,torange of code points to include

Definition at line 83 of file url_percent_encode.h.

◆ operator[]()

template<typename CharT>
bool upa::code_point_set::operator[] ( CharT c) const
inlinenodiscardconstexpr

test code point set contains code point c

Parameters
[in]ccode point to test

Definition at line 91 of file url_percent_encode.h.


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