qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
uri.h File Reference

URI parsing and manipulation utilities. More...

#include <charconv>
#include <qb/io/config.h>
#include <qb/system/container/unordered_map.h>
#include <qb/utility/build_macros.h>
#include <regex>
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for uri.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  qb::io::uri
 Class for parsing, manipulating, and representing URIs. More...

Functions

bool qb::io::is_alnum (int c)
 Checks if a character is alphanumeric.
bool qb::io::is_unreserved (int c)
 Checks if a character is unreserved according to RFC 3986.
bool qb::io::is_gen_delim (int c)
 Checks if a character is a general delimiter according to RFC 3986.
bool qb::io::is_sub_delim (int c)
 Checks if a character is a subdelimiter according to RFC 3986.
bool qb::io::is_reserved (int c)
 Checks if a character is reserved according to RFC 3986.
bool qb::io::is_scheme_character (int c)
 Checks if a character is valid for a URI scheme.
bool qb::io::is_user_info_character (int c)
 Checks if a character is valid for URI user information.
bool qb::io::is_authority_character (int c)
 Checks if a character is valid for the authority part of a URI.
bool qb::io::is_path_character (int c)
 Checks if a character is valid for the path part of a URI.
bool qb::io::is_query_character (int c)
 Checks if a character is valid for the query part of a URI.
bool qb::io::is_fragment_character (int c)
 Checks if a character is valid for the fragment part of a URI.

Detailed Description

URI parsing and manipulation utilities.

This file provides a comprehensive URI (Uniform Resource Identifier) implementation that follows RFC 3986 standards. It includes functionality for parsing, encoding, decoding, and manipulating URIs with support for schemes, authority components, paths, queries, and fragments.

The implementation supports both IPv4 and IPv6 addressing formats and provides utility functions for character classification according to URI specifications.

Author
qb - C++ Actor Framework

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ is_alnum()

bool qb::io::is_alnum ( int c)
inline

Checks if a character is alphanumeric.

Parameters
cThe character to check
Returns
true if the character is alphanumeric, false otherwise

◆ is_unreserved()

bool qb::io::is_unreserved ( int c)
inline

Checks if a character is unreserved according to RFC 3986.

Parameters
cThe character to check
Returns
true if the character is unreserved, false otherwise

◆ is_gen_delim()

bool qb::io::is_gen_delim ( int c)
inline

Checks if a character is a general delimiter according to RFC 3986.

Parameters
cThe character to check
Returns
true if the character is a general delimiter, false otherwise

◆ is_sub_delim()

bool qb::io::is_sub_delim ( int c)
inline

Checks if a character is a subdelimiter according to RFC 3986.

Parameters
cThe character to check
Returns
true if the character is a subdelimiter, false otherwise

◆ is_reserved()

bool qb::io::is_reserved ( int c)
inline

Checks if a character is reserved according to RFC 3986.

Parameters
cThe character to check
Returns
true if the character is reserved, false otherwise

◆ is_scheme_character()

bool qb::io::is_scheme_character ( int c)
inline

Checks if a character is valid for a URI scheme.

Parameters
cThe character to check
Returns
true if the character is valid for a scheme, false otherwise

◆ is_user_info_character()

bool qb::io::is_user_info_character ( int c)
inline

Checks if a character is valid for URI user information.

Parameters
cThe character to check
Returns
true if the character is valid for user information, false otherwise

◆ is_authority_character()

bool qb::io::is_authority_character ( int c)
inline

Checks if a character is valid for the authority part of a URI.

Parameters
cThe character to check
Returns
true if the character is valid for authority, false otherwise

◆ is_path_character()

bool qb::io::is_path_character ( int c)
inline

Checks if a character is valid for the path part of a URI.

Parameters
cThe character to check
Returns
true if the character is valid for path, false otherwise

◆ is_query_character()

bool qb::io::is_query_character ( int c)
inline

Checks if a character is valid for the query part of a URI.

Parameters
cThe character to check
Returns
true if the character is valid for query, false otherwise

◆ is_fragment_character()

bool qb::io::is_fragment_character ( int c)
inline

Checks if a character is valid for the fragment part of a URI.

Parameters
cThe character to check
Returns
true if the character is valid for fragment, false otherwise