url Class Reference
#include <url.h>
Detailed Description
The
url class is used to represent a uniform resource locator (URL).
Definition at line 28 of file url.h.
Constructor & Destructor Documentation
virtual url::~url |
( |
|
) |
[virtual] |
The constructor.
- Parameters:
-
| s | The string to be broken up to fill out the component pieces. |
url::url |
( |
const char * |
s |
) |
|
The constructor.
- Parameters:
-
| s | The string to be broken up to fill out the component pieces. |
The default constructor. Do not use.
Member Function Documentation
url& url::operator= |
( |
const url & |
|
) |
|
void url::split |
( |
const char * |
s |
) |
|
The split method is used to replace the URL's contents with the given string, once it has been split into its component parts.
- Parameters:
-
| s | The string to be disassembled. |
bool url::is_a_file |
( |
|
) |
const |
The is_a_file method is used to determine if the URL is a simple file URL.
- Returns:
- bool; true if it's a simple file URL, false if it's something else.
The get_path method is used to extract the path part of a file URL. The behaviour is undefined if is_a_file is false.
void url::set_path_if_empty |
( |
const nstring & |
dflt |
) |
|
The set_path_if_empty method is used to set the URL's path to the given default if it is not set already.
void url::set_query_if_empty |
( |
const nstring & |
dflt |
) |
|
The set_query_if_empty method is used to set the URL's query to the given default if it is not set already.
nstring url::reassemble |
( |
bool |
exclude_userpass = false |
) |
const |
The reassemble method is used to reassemble the URL into a string representation.
- Parameters:
-
| exclude_userpass | Set it to true if you need to exclude userpass from the result URL. Default to false. |
void url::set_host_part_from |
( |
const url & |
arg |
) |
|
The set_host_part_from method is used to set the host part (and protocol, and port) from the given argument.
- Parameters:
-
| arg | The URL to take the host part from. |
nstring url::get_protocol |
( |
|
) |
const [inline] |
The get_protocol method is used to obtain the protocol name from the URL.
Definition at line 122 of file url.h.
nstring url::get_userpass |
( |
|
) |
const [inline] |
The get_userpass method is used to obtain the userpass from the URL.
Definition at line 128 of file url.h.
nstring url::get_hostname |
( |
|
) |
const [inline] |
The get_hostname method is used to obtain the host name from the URL.
Definition at line 134 of file url.h.
int url::get_port |
( |
|
) |
const [inline] |
The get_port method is used to obtain the port name from the URL.
Definition at line 140 of file url.h.
Field Documentation
The protocol instance variable is used to remember the communications protocol to be used.
Definition at line 147 of file url.h.
The userpass instance variable is used to remember the username and password embedded in the url. It must end with the @ sign.
Definition at line 153 of file url.h.
The hostname instance variable is used to remember the name of the host to talk to.
Definition at line 159 of file url.h.
The port instance variable is used to remember the point number to connect to on the remote host.
Definition at line 165 of file url.h.
The path instance variable is used to remember the path to the file being queried on the remote host.
Definition at line 171 of file url.h.
The query instance variable is used to remember the query string (including question mark) to be sent to the remote host.
Definition at line 177 of file url.h.
The anchor_name instance variable is used to remember the name of the anchor (including the hash sign) within the page fetched.
Definition at line 183 of file url.h.
The documentation for this class was generated from the following file: