VUtil::URL Class Reference
[libvos]
#include <vos/vos/url.hh>
Detailed Description
A class implementing basic handling of Uniform Resource Locator (URL) expressions.
Definition at line 52 of file url.hh.
Public Member Functions
- URL ()
- Construct a URL using the default fields.
- Construct a URL using the default fields.
- URL (const std::string &protocol, const std::string &host, const std::string &port, const std::string &path)
- Construct a URL using the supplied fields.
- Construct a URL using the supplied fields.
- URL (const std::string &url)
- URL (const URL &url)
- URL & operator= (const URL &u)
- URL & operator= (const std::string &s)
- std::string getString () const
- Get a std::string representation of the URL in the usual form ("protocol://host:port/path").
- Get a std::string representation of the URL in the usual form ("protocol://host:port/path").
- std::string getProtocol () const
- std::string getHost () const
- std::string getPort () const
- std::string getPath () const
- std::string getHostAndPort () const
- std::string getAllButPath () const
- void setProtocol (const std::string &p)
- void setHost (const std::string &h)
- void setPort (const std::string &p)
- void setPort (unsigned int p)
- void setPath (const std::string &p)
- void setHostAndPort (const std::string &hp)
Static Public Member Functions
- static void setDefaults (URL &url)
- Set a URL object used to supply default fields used by the constructors.
- Set a URL object used to supply default fields used by the constructors.
Constructor & Destructor Documentation
| VUtil::URL::URL | ( | ) |
Construct a URL using the default fields.
| VUtil::URL::URL | ( | const std::string & | protocol, | |
| const std::string & | host, | |||
| const std::string & | port, | |||
| const std::string & | path | |||
| ) |
Construct a URL using the supplied fields.
- Parameters:
-
protocol the protocol field host the host field port the port field path everything after the port
| VUtil::URL::URL | ( | const std::string & | url | ) |
Construct a URL by parsing the supplied URL std::string.
Empty fields will be filled in using the default if they are not found!
- Parameters:
-
url a URL in the usual form ("protocol://host:port/path")
- Exceptions:
-
BadURLError if
| VUtil::URL::URL | ( | const URL & | url | ) |
Member Function Documentation
| std::string VUtil::URL::getAllButPath | ( | ) | const |
- Returns:
- everything but the path in the form "proto://host:port"
| std::string VUtil::URL::getHost | ( | ) | const |
- Returns:
- the host field
| std::string VUtil::URL::getHostAndPort | ( | ) | const |
- Returns:
- the host and port in the form "host:port"
| std::string VUtil::URL::getPath | ( | ) | const |
- Returns:
- the path field
| std::string VUtil::URL::getPort | ( | ) | const |
- Returns:
- the port field
| std::string VUtil::URL::getProtocol | ( | ) | const |
- Returns:
- the protocol field
| std::string VUtil::URL::getString | ( | ) | const |
Get a std::string representation of the URL in the usual form ("protocol://host:port/path").
- Returns:
- the URL std::string
Referenced by listChildren(), and main().
| URL& VUtil::URL::operator= | ( | const std::string & | s | ) |
| static void VUtil::URL::setDefaults | ( | URL & | url | ) | [static] |
| void VUtil::URL::setHost | ( | const std::string & | h | ) |
- Parameters:
-
h set the host field
| void VUtil::URL::setHostAndPort | ( | const std::string & | hp | ) |
- Parameters:
-
hp set the host and port fields together, supplied in the form "host:port"
| void VUtil::URL::setPath | ( | const std::string & | p | ) |
- Parameters:
-
p set the path field
| void VUtil::URL::setPort | ( | unsigned int | p | ) |
- Parameters:
-
p set the port field
| void VUtil::URL::setPort | ( | const std::string & | p | ) |
- Parameters:
-
p set the port field
| void VUtil::URL::setProtocol | ( | const std::string & | p | ) |
- Parameters:
-
p set the protocol field
The documentation for this class was generated from the following file:
- /home/tetron/hack/vos/libs/vos/vutil/url.hh