# saga::url Class Reference

SAGA's implementation of an RFC 1630 compliant URL Class. More...

`#include <url.hpp>`

Inheritance diagram for saga::url:

[legend]

List of all members.

## Public Member Functions
| url ()
| url (saga::object rhs)
| url (saga::url const &rhs)
| url (std::string const &urlstr)
| url (char const *urlstr)
| ~url (void)
url & | operator= (char const *urlstr)
url & | operator= (std::string const &urlstr)
url & | operator= (saga::url const &rhs)
url & | operator= (saga::object const &rhs)
saga::object | clone () const
| Brief description starts here.
std::string | get_string (void) const
| Retrieves the url as string.
void | set_string (std::string const &url)
| Set a new url.
std::string | get_scheme (void) const
| Gets an url scheme.
void | set_scheme (std::string const &scheme)
| Sets an url scheme.
std::string | get_host (void) const
| Gets an url host.
void | set_host (std::string const &host)
| Sets an url hosts.
int | get_port (void) const
| Gets an url port.
void | set_port (int port)
| Sets an url port.
std::string | get_fragment (void) const
| Gets an url fragment.
void | set_fragment (std::string const &fragment)
| Sets an url fragment.
std::string | get_path (void) const
| Gets an url path.
void | set_path (std::string const &path)
| Sets an url path.
std::string | get_userinfo (void) const
| Gets an url user information.
void | set_userinfo (std::string const &userinfo)
| Sets an url user information.
saga::url | translate (std::string scheme) const
| Translates and URL to a new scheme.
saga::url | translate (saga::session s, std::string scheme) const
| Translates and URL to a new scheme.
std::string | get_url (void) const
| Gets an url.
void | set_url (std::string const &url)
| Sets an url.
std::string | get_authority (void) const
| Gets an url authority.
std::string | get_query (void) const
| Gets an url query.
void | set_query (std::string const &query)
| Sets an url query.
void | set_scheme_specific_part (std::string const &scheme_specific_part)
| Brief description starts here.
std::string | get_username (void) const
| Gets an username.
void | set_username (std::string const &username)
| Sets the username.
std::string | get_password (void) const
| Gets the password.
void | set_password (std::string const &passwd)
| Sets the password.
## Static Public Member Functions
static std::string | unescape (std::string const &in)
| Remove all escape sequence from a string resembling (part of) s an url.
static std::string | escape (std::string const &in)
| Add escape sequences to a string resembling (part of) an url.

## Detailed Description

SAGA's implementation of an RFC 1630 compliant URL Class.

URLs (and URIs, see below) are a dominant concept for referencing external resources. As such, they are also widely in the Grid world, and in SAGA. This class helps to manage such URLs.

Example:

## Constructor & Destructor Documentation

saga::url::url | ( | void |  | ) |

saga::url::url | ( | saga::object | rhs | ) | `[explicit]`

References saga::BadParameter, saga::object::get_type(), and saga::object::URL.

saga::url::url | ( | saga::url const & | rhs | ) |

saga::url::url | ( | std::string const & | urlstr | ) |

saga::url::url | ( | char const * | urlstr | ) |

saga::url::~url | ( | void |  | ) |

## Member Function Documentation

url & saga::url::operator= | ( | char const * | urlstr | ) |

References set_url().

url & saga::url::operator= | ( | std::string const & | urlstr | ) |

References set_url().

url & saga::url::operator= | ( | saga::url const & | rhs | ) |

References clone().

url & saga::url::operator= | ( | saga::object const & | rhs | ) |

References saga::BadParameter, saga::object::clone(), saga::object::get_type(), and saga::object::URL.

saga::object saga::url::clone | ( | void |  | ) | const

Brief description starts here.

Reimplemented from saga::object.

References saga::object::clone().

Referenced by operator=().

std::string saga::url::get_string | ( | void |  | ) | const

Retrieves the url as string.

Returns:
  String representing the url.

Referenced by saga::operator<(), saga::operator<<(), and saga::operator==().

void saga::url::set_string | ( | std::string const & | url | ) |

Set a new url.

std::string saga::url::get_scheme | ( | void |  | ) | const

Gets an url scheme.

Returns:
  The url scheme.

void saga::url::set_scheme | ( | std::string const & | scheme | ) |

Sets an url scheme.

std::string saga::url::get_host | ( | void |  | ) | const

Gets an url host.

Returns:
  The host.

void saga::url::set_host | ( | std::string const & | host | ) |

Sets an url hosts.

int saga::url::get_port | ( | void |  | ) | const

Gets an url port.

Returns:
  the port.

void saga::url::set_port | ( | int | port | ) |

Sets an url port.

std::string saga::url::get_fragment | ( | void |  | ) | const

Gets an url fragment.

Returns:
  The url fragment.

void saga::url::set_fragment | ( | std::string const & | fragment | ) |

Sets an url fragment.

std::string saga::url::get_path | ( | void |  | ) | const

Gets an url path.

Returns:
  The path.

void saga::url::set_path | ( | std::string const & | path | ) |

Sets an url path.

std::string saga::url::get_userinfo | ( | void |  | ) | const

Gets an url user information.

Returns:
  The user information.

void saga::url::set_userinfo | ( | std::string const & | userinfo | ) |

Sets an url user information.

saga::url saga::url::translate | ( | std::string | scheme | ) | const`[inline]`

Translates and URL to a new scheme.

Parameters:

  | scheme | The new scheme to translate into

Returns:
  String representation of the translated url.

saga::url saga::url::translate | ( | saga::session | s,
|  | std::string | scheme |
| ) |  |  | const`[inline]`

Translates and URL to a new scheme.

Parameters:

  | scheme | The new scheme to translate into

Returns:
  String representation of the translated url.

std::string saga::url::get_url | ( | void |  | ) | const

Gets an url.

Returns:
  The url.

Referenced by saga::sd::service_description::service_description().

void saga::url::set_url | ( | std::string const & | url | ) |

Sets an url.

Referenced by operator=().

std::string saga::url::get_authority | ( | void |  | ) | const

Gets an url authority.

std::string saga::url::get_query | ( | void |  | ) | const

Gets an url query.

void saga::url::set_query | ( | std::string const & | query | ) |

Sets an url query.

void saga::url::set_scheme_specific_part | ( | std::string const & | scheme_specific_part | ) |

Brief description starts here.

std::string saga::url::get_username | ( | void |  | ) | const

Gets an username.

void saga::url::set_username | ( | std::string const & | username | ) |

Sets the username.

std::string saga::url::get_password | ( | void |  | ) | const

Gets the password.

void saga::url::set_password | ( | std::string const & | passwd | ) |

Sets the password.

std::string saga::url::unescape | ( | std::string const & | in | ) | `[static]`

Remove all escape sequence from a string resembling (part of) s an url.

std::string saga::url::escape | ( | std::string const & | in | ) | `[static]`

Add escape sequences to a string resembling (part of) an url.

The documentation for this class was generated from the following files:

- url.hpp
- url.cpp