SAGA C++ API 1.6
saga::url Class Reference

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

#include <url.hpp>

Inheritance diagram for saga::url:

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)
urloperator= (char const *urlstr)
urloperator= (std::string const &urlstr)
urloperator= (saga::url const &rhs)
urloperator= (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.
void set_authority (std::string const &auth)
 Sets 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.

Friends

std::ostream & operator<< (std::ostream &os, url const &u)
 Brief description starts here.
std::istream & operator>> (std::istream &is, url &u)
 Brief description starts here.
bool operator== (saga::url const &lhs, saga::url const &rhs)
 Brief description starts here.
bool operator!= (saga::url const &lhs, saga::url const &rhs)
 Brief description starts here.
bool operator< (saga::url const &lhs, saga::url const &rhs)
 Brief description starts here.

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:

Definition at line 67 of file url.hpp.


Constructor & Destructor Documentation

saga::url::url ( void  )

Definition at line 53 of file url.cpp.

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

Definition at line 39 of file url.cpp.

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

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

Definition at line 48 of file url.cpp.

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

Definition at line 19 of file url.cpp.

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

Definition at line 24 of file url.cpp.

saga::url::~url ( void  )

Definition at line 58 of file url.cpp.


Member Function Documentation

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

Definition at line 62 of file url.cpp.

References set_url().

Referenced by operator=().

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

Definition at line 68 of file url.cpp.

References set_url().

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

Definition at line 74 of file url.cpp.

References clone(), and operator=().

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

Definition at line 146 of file advert.cpp.

References saga::name_space::entry::operator=().

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

Brief description starts here.

Reimplemented from saga::object.

Definition at line 106 of file url.cpp.

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.

Definition at line 121 of file url.cpp.

Referenced by saga::operator<<().

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

Set a new url.

Definition at line 131 of file url.cpp.

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

Gets an url scheme.

Returns:
The url scheme.

Definition at line 141 of file url.cpp.

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

Sets an url scheme.

Definition at line 186 of file url.cpp.

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

Gets an url host.

Returns:
The host.

Definition at line 146 of file url.cpp.

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

Sets an url hosts.

Definition at line 196 of file url.cpp.

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

Gets an url port.

Returns:
the port.

Definition at line 151 of file url.cpp.

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

Sets an url port.

Definition at line 201 of file url.cpp.

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

Gets an url fragment.

Returns:
The url fragment.

Definition at line 156 of file url.cpp.

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

Sets an url fragment.

Definition at line 211 of file url.cpp.

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

Gets an url path.

Returns:
The path.

Definition at line 161 of file url.cpp.

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

Sets an url path.

Definition at line 216 of file url.cpp.

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

Gets an url user information.

Returns:
The user information.

Definition at line 171 of file url.cpp.

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

Sets an url user information.

Definition at line 226 of file url.cpp.

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

Translates and URL to a new scheme.

Parameters:
schemeThe new scheme to translate into
Returns:
String representation of the translated url.

Definition at line 211 of file url.hpp.

References saga::task::get_result().

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

Translates and URL to a new scheme.

Parameters:
schemeThe new scheme to translate into
Returns:
String representation of the translated url.

Definition at line 222 of file url.hpp.

References saga::task::get_result().

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

Gets an url.

Returns:
The url.

Definition at line 111 of file url.cpp.

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

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

Sets an url.

Definition at line 116 of file url.cpp.

Referenced by operator=().

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

Gets an url authority.

Definition at line 136 of file url.cpp.

void saga::url::set_authority ( std::string const &  auth)

Sets an url authority.

Definition at line 206 of file url.cpp.

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

Gets an url query.

Definition at line 166 of file url.cpp.

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

Sets an url query.

Definition at line 221 of file url.cpp.

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

Brief description starts here.

Definition at line 191 of file url.cpp.

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

Gets an username.

Definition at line 176 of file url.cpp.

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

Sets the username.

Definition at line 231 of file url.cpp.

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

Gets the password.

Definition at line 181 of file url.cpp.

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

Sets the password.

Definition at line 236 of file url.cpp.

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

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

Definition at line 270 of file url.cpp.

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

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

Definition at line 275 of file url.cpp.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
url const &  u 
) [friend]

Brief description starts here.

Definition at line 241 of file url.cpp.

std::istream& operator>> ( std::istream &  is,
url u 
) [friend]

Brief description starts here.

Definition at line 247 of file url.cpp.

bool operator== ( saga::url const &  lhs,
saga::url const &  rhs 
) [friend]

Brief description starts here.

Definition at line 255 of file url.cpp.

bool operator!= ( saga::url const &  lhs,
saga::url const &  rhs 
) [friend]

Brief description starts here.

Definition at line 260 of file url.cpp.

bool operator< ( saga::url const &  lhs,
saga::url const &  rhs 
) [friend]

Brief description starts here.

Definition at line 265 of file url.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines