|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Uniform Resource Indentifier (URI) More...
#include <cc/Uri>
Public Member Functions | |
| Uri ()=default | |
| Create an invalid URI. | |
| Uri (const String &text) | |
| Create a new URI from text. | |
| Uri (const char *text) | |
| Create a new URI from text. | |
| Uri (const String &text, const Token &token) | |
| Create a new URI from text using the UriSyntax production token. | |
| bool | isValid () const |
| Tell if this URI is valid. | |
| operator bool () const | |
| Tell if this URI is valid. | |
| String | scheme () const |
| URI scheme (e.g. | |
| void | setScheme (const String &newValue) |
| Set the URI scheme to newValue | |
| String | userInfo () const |
| User and password information (e.g. | |
| void | setUserInfo (const String &newValue) |
| Set the user information to newValue | |
| String | host () const |
| Registered host name or numeric address (IPv4 or IPv6) | |
| void | setHost (const String &newValue) |
| Set the host name to newValue | |
| bool | hostIsNumeric () const |
| Tell if the host part is a numeric address. | |
| bool | isHostNumeric () const |
| Tell if the host part is a numeric address. | |
| int | port () const |
| Service port. | |
| void | setPort (int newValue) |
| Set the service port to newValue | |
| String | path () const |
| Path component of the URI. | |
| void | setPath (const String &newValue) |
| Set the path component of the URI to newValue | |
| String | query () const |
| Get tje query component of the URI. | |
| void | setQuery (const String &newValue) |
| Set the query component of the URI to newValue | |
| String | fragment () const |
| Get the fragment component of the URI. | |
| void | setFragment (const String &newValue) |
| Set the fragment component of the URI to newValue | |
| String | requestHost () const |
| Get the host name including the port number. | |
| String | requestPath () const |
| Get the full request path (path, query and fragment component) | |
| String | toString () const |
| Return the human readable textual representation of this URI | |
| String | encoded () const |
| Return an percent encoded textual representation of this URI | |
| SocketAddress | resolve (int port=0) const |
| Resolve internet address of this URI. | |
| ProtocolFamily | family () const |
| Protocol family of uri (if uri contains a numeric host part) | |
Static Public Member Functions | |
| static String | encode (const String &text) |
| Encode text using percent encoding. | |
| static String | decode (const String &text) |
| Decode text from percent encoding. | |
| static void | decode (InOut< String > text) |
| Decode text from percent encoding. | |
| static String | encodeForm (const Map< String > &form) |
| Encode a percent encoded web input form. | |
| static Map< String > | decodeForm (const String &payload) |
| Decode a percent encoded web input form. | |
Uniform Resource Indentifier (URI)
|
default |
Create an invalid URI.
Create a new URI from text using the UriSyntax production token.
| bool isValid | ( | ) | const |
Tell if this URI is valid.
|
explicit |
Tell if this URI is valid.
| String scheme | ( | ) | const |
URI scheme (e.g.
http, file)
| void setScheme | ( | const String & | newValue | ) |
Set the URI scheme to newValue
| String userInfo | ( | ) | const |
User and password information (e.g.
"oscar:123456")
| void setUserInfo | ( | const String & | newValue | ) |
Set the user information to newValue
| String host | ( | ) | const |
Registered host name or numeric address (IPv4 or IPv6)
| void setHost | ( | const String & | newValue | ) |
Set the host name to newValue
| bool hostIsNumeric | ( | ) | const |
Tell if the host part is a numeric address.
| bool isHostNumeric | ( | ) | const |
Tell if the host part is a numeric address.
| int port | ( | ) | const |
Service port.
| void setPort | ( | int | newValue | ) |
Set the service port to newValue
| void setPath | ( | const String & | newValue | ) |
Set the path component of the URI to newValue
| String query | ( | ) | const |
Get tje query component of the URI.
| void setQuery | ( | const String & | newValue | ) |
Set the query component of the URI to newValue
| String fragment | ( | ) | const |
Get the fragment component of the URI.
| void setFragment | ( | const String & | newValue | ) |
Set the fragment component of the URI to newValue
| String requestHost | ( | ) | const |
Get the host name including the port number.
| String requestPath | ( | ) | const |
Get the full request path (path, query and fragment component)
| String toString | ( | ) | const |
Return the human readable textual representation of this URI
| String encoded | ( | ) | const |
Return an percent encoded textual representation of this URI
| SocketAddress resolve | ( | int | port = 0 | ) | const |
Resolve internet address of this URI.
| port | Port number to set (if this URI does not provide a port number) |
| HostNameResolutionError |
| ProtocolFamily family | ( | ) | const |
Protocol family of uri (if uri contains a numeric host part)