A class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web. A resource can be something as simple as a file or a directory, or it can be a reference to a more complicated object, such as a query to a database or to a search engine. This class is based on the MIT code uripp http://uripp.sourceforge.net/ . More...
#include <URL.h>
Public Types | |
| typedef uri::path::const_iterator | const_pathIterator | 
| path const iterator type  More... | |
| typedef uri::query::const_iterator | const_queryIterator | 
| query const iterator type  More... | |
| typedef uri::query::iterator | queryIterator | 
| query iterator type  More... | |
Public Member Functions | |
Initializer Methods  | |
Methods related to instantiation and destruction.  | |
| URL () | |
| Default constructor of a new URL.  More... | |
| URL (const std::string &s) | |
| It initializes a new URL with the given valid string url.  More... | |
| ~URL () | |
| Destructor.  More... | |
Accessor methods  | |
Methods used to get or set properties.  | |
| std::string | getString () | 
| It returns URL string.  More... | |
| std::string | getEncodedString () | 
| It returns encoded URL string.  More... | |
| void | setEncodedString (const std::string &) | 
| It sets the encoded URL string.  More... | |
| const std::string & | getProtocol () const | 
| It returns the protocol.  More... | |
| void | setProtocol (const std::string &s) | 
| It sets the protocol.  More... | |
| const std::string & | getHost () const | 
| It returns the host.  More... | |
| void | setHost (const std::string &s) | 
| It sets the host.  More... | |
| uri::authority::host_type_e | getHostType () const | 
| It returns the host type.  More... | |
| unsigned short | getHostPort () const | 
| It returns the host port.  More... | |
| void | setHostPort (unsigned short p) | 
| It sets the host port.  More... | |
| std::string | getLogin () const | 
| It returns the login.  More... | |
| void | setLogin (const std::string &s) | 
| It sets the login.  More... | |
| std::string | getPassword () const | 
| It returns the password.  More... | |
| void | setPassword (const std::string &s) | 
| It sets the password.  More... | |
| std::string | getPathString () const | 
| It returns the path.  More... | |
| std::string | getEncodedPathString () const | 
| It returns the encoded path.  More... | |
| void | setEncodedPathString (const std::string &path) | 
| It sets the encoded path.  More... | |
| void | clearPath () | 
| It cleans the path.  More... | |
| void | addPath (const std::string &p) | 
| It adds the path.  More... | |
| bool | isAbsolutePath () const | 
| It Checks if the path is absolute.  More... | |
| void | setIsAbsolutePath (bool v) | 
| It sets the absolute path propertie.  More... | |
| bool | isDirectoryPath () const | 
| It Checks if the path is directory.  More... | |
| void | setIsDirectoryPath (bool v) | 
| It sets the directory path propertie.  More... | |
| bool | isEmptyPath () const | 
| It Checks if the path is empty.  More... | |
| const_pathIterator | beginPath () const | 
| It returns the begin const path iterator.  More... | |
| const_pathIterator | endPath () const | 
| It returns the end const path iterator.  More... | |
| std::string | getQueryString () | 
| It returns the query string.  More... | |
| std::string | getEncodedQueryString () const | 
| It returns the encoded query.  More... | |
| void | setEncodedQueryString (const std::string &query) | 
| It sets the encoded query.  More... | |
| int | getQuerySize () const | 
| It returns the query size.  More... | |
| void | clearQuery () | 
| It cleans the vector of queries.  More... | |
| void | addQuery (const std::string &key, const std::string &value) | 
| It cleans the vector of queries.  More... | |
| queryIterator | beginQuery () | 
| It returns the begin query iterator.  More... | |
| queryIterator | endQuery () | 
| It returns the end query iterator.  More... | |
| const_queryIterator | beginQuery () const | 
| It returns the begin const query iterator.  More... | |
| const_queryIterator | endQuery () const | 
| It returns the end const query iterator.  More... | |
| te::common::URL::queryIterator | findQueryKey (const std::string &key) | 
| it finds the key and return query iterator.  More... | |
| te::common::URL::const_queryIterator | findQueryKey (const std::string &key) const | 
| it finds the key and return const query iterator.  More... | |
| std::string | getFragmentString () const | 
| It returns the fragment.  More... | |
| std::string | getEncodedFragmentString () const | 
| It returns encoded the fragment.  More... | |
| void | setFragmentString (const std::string &f) | 
| It sets the fragment.  More... | |
| void | setEncodedFragmentString (const std::string &f) | 
| It sets the encoded fragment.  More... | |
Private Attributes | |
| uri::uri | m_uri | 
A class URL represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web. A resource can be something as simple as a file or a directory, or it can be a reference to a more complicated object, such as a query to a database or to a search engine. This class is based on the MIT code uripp http://uripp.sourceforge.net/ .
| typedef uri::query::const_iterator te::common::URL::const_queryIterator | 
| typedef uri::query::iterator te::common::URL::queryIterator | 
| te::common::URL::URL | ( | ) | 
Default constructor of a new URL.
| te::common::URL::URL | ( | const std::string & | s | ) | 
It initializes a new URL with the given valid string url.
| s | The valid encoded string url. | 
| te::common::URL::~URL | ( | ) | 
Destructor.
| void te::common::URL::addPath | ( | const std::string & | p | ) | 
It adds the path.
| p | The path string to be added. | 
| void te::common::URL::addQuery | ( | const std::string & | key, | 
| const std::string & | value | ||
| ) | 
It cleans the vector of queries.
| query | The query string. | 
| const_pathIterator te::common::URL::beginPath | ( | ) | const | 
It returns the begin const path iterator.
| queryIterator te::common::URL::beginQuery | ( | ) | 
It returns the begin query iterator.
| const_queryIterator te::common::URL::beginQuery | ( | ) | const | 
It returns the begin const query iterator.
| void te::common::URL::clearPath | ( | ) | 
It cleans the path.
| void te::common::URL::clearQuery | ( | ) | 
It cleans the vector of queries.
| const_pathIterator te::common::URL::endPath | ( | ) | const | 
It returns the end const path iterator.
| queryIterator te::common::URL::endQuery | ( | ) | 
It returns the end query iterator.
| const_queryIterator te::common::URL::endQuery | ( | ) | const | 
It returns the end const query iterator.
| te::common::URL::queryIterator te::common::URL::findQueryKey | ( | const std::string & | key | ) | 
it finds the key and return query iterator.
| key | The key to be found. | 
| te::common::URL::const_queryIterator te::common::URL::findQueryKey | ( | const std::string & | key | ) | const | 
it finds the key and return const query iterator.
| key | The key to be found. | 
| std::string te::common::URL::getEncodedFragmentString | ( | ) | const | 
It returns encoded the fragment.
| std::string te::common::URL::getEncodedPathString | ( | ) | const | 
It returns the encoded path.
| std::string te::common::URL::getEncodedQueryString | ( | ) | const | 
It returns the encoded query.
| std::string te::common::URL::getEncodedString | ( | ) | 
It returns encoded URL string.
| std::string te::common::URL::getFragmentString | ( | ) | const | 
It returns the fragment.
| const std::string& te::common::URL::getHost | ( | ) | const | 
It returns the host.
| unsigned short te::common::URL::getHostPort | ( | ) | const | 
It returns the host port.
| uri::authority::host_type_e te::common::URL::getHostType | ( | ) | const | 
It returns the host type.
| std::string te::common::URL::getLogin | ( | ) | const | 
It returns the login.
| std::string te::common::URL::getPassword | ( | ) | const | 
It returns the password.
| std::string te::common::URL::getPathString | ( | ) | const | 
It returns the path.
| const std::string& te::common::URL::getProtocol | ( | ) | const | 
It returns the protocol.
| int te::common::URL::getQuerySize | ( | ) | const | 
It returns the query size.
| std::string te::common::URL::getQueryString | ( | ) | 
It returns the query string.
| std::string te::common::URL::getString | ( | ) | 
It returns URL string.
| bool te::common::URL::isAbsolutePath | ( | ) | const | 
It Checks if the path is absolute.
| bool te::common::URL::isDirectoryPath | ( | ) | const | 
It Checks if the path is directory.
| bool te::common::URL::isEmptyPath | ( | ) | const | 
It Checks if the path is empty.
| void te::common::URL::setEncodedFragmentString | ( | const std::string & | f | ) | 
It sets the encoded fragment.
| f | The encoded fragment string. | 
| void te::common::URL::setEncodedPathString | ( | const std::string & | path | ) | 
It sets the encoded path.
| path | The encoded path string. | 
| void te::common::URL::setEncodedQueryString | ( | const std::string & | query | ) | 
It sets the encoded query.
| query | The encoded query string. | 
| void te::common::URL::setEncodedString | ( | const std::string & | ) | 
It sets the encoded URL string.
| void te::common::URL::setFragmentString | ( | const std::string & | f | ) | 
It sets the fragment.
| f | The fragment string. | 
| void te::common::URL::setHost | ( | const std::string & | s | ) | 
It sets the host.
| s | The host. | 
| void te::common::URL::setHostPort | ( | unsigned short | p | ) | 
It sets the host port.
| p | The host port. | 
| void te::common::URL::setIsAbsolutePath | ( | bool | v | ) | 
It sets the absolute path propertie.
| v | True for absolute path, false otherwise. | 
| void te::common::URL::setIsDirectoryPath | ( | bool | v | ) | 
It sets the directory path propertie.
| v | True for directory path, false otherwise. | 
| void te::common::URL::setLogin | ( | const std::string & | s | ) | 
It sets the login.
| s | The login. | 
| void te::common::URL::setPassword | ( | const std::string & | s | ) | 
It sets the password.
| s | The login. | 
| void te::common::URL::setProtocol | ( | const std::string & | s | ) | 
It sets the protocol.
| s | The protocol |