latest version v1.9 - last update 10 Apr 2010 |
This class is used to split a URL into its separate fields. More...
#include <ltiURL.h>
Public Member Functions | |
urlFields () | |
urlFields (const std::string &u) | |
int | getPort () const |
const std::string & | getHostname () const |
const std::string & | getPath () const |
serviceType | getService () const |
This class is used to split a URL into its separate fields.
For example, if you call its constructor with "http://ltilib.sourceforge.net:80/index.html", it would split it into the service type (http), the hostname (ltilib.sourceforge.net), the port (80), and the path (/index.html).
lti::url::urlFields::urlFields | ( | ) |
Default constructor.
Is equivalent to using "http://localhost/index.html".
lti::url::urlFields::urlFields | ( | const std::string & | u | ) |
Constructor.
const std::string& lti::url::urlFields::getHostname | ( | ) | const [inline] |
Returns the hostname.
const std::string& lti::url::urlFields::getPath | ( | ) | const [inline] |
Returns the path.
int lti::url::urlFields::getPort | ( | ) | const [inline] |
Returns the port number for the URL.
If no number is specified, the port depends on the service type. E.g. its 80 for HTTP, 21 for FTP.
serviceType lti::url::urlFields::getService | ( | ) | const [inline] |
Returns the service type.