saga::url Class Reference

#include <url.hpp>

Inheritance diagram for saga::url:

saga::object

List of all members.


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:

#include <saga/saga.hpp>

int main (int argc, char* argv[])
{
  try 
  {
    saga::url in("http://data.silo.net/data/joe_doe/recent/abc.dat"); 
    saga::url out = in.translate ("ftp://"); 

    std::cout << in.get_string () << std::endl; 
    std::cout << out.get_string () << std::endl; 
  }
  catch(saga::exception const & e) 
  {
    std::cout << "Ooops: " << e.what() << std::endl;
  }  

  return 0;
}


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 const &url)
 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.

Constructor & Destructor Documentation

saga::url::url ( void   ) 

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

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  ) 

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.

Referenced by main().

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

Sets an url hosts.

Referenced by main().

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.

Referenced by main().

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 const &  url  ) 

Translates and URL to a new scheme.

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

References saga::NotImplemented.

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

Gets an url.

Returns:
The url.

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.


Generated on Mon Aug 25 13:15:45 2008 for SAGA C++ API by  doxygen 1.5.6