Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::URL Class Reference
[Networking library]

Uniform resource locator. More...

#include <purl.h>

List of all members.

Public Member Functions

 URL ()
 Default constructor.

 URL (const std::string &url) throw (InvalidURL,NetDbError)
 Parse URL constructor.

 URL (const URL &url)
 ~URL ()
const std::string & protocol () const
void setProtocol (const std::string &proto, bool setPort=true)
const std::string & host () const
void setHost (const std::string &host)
const std::string & user () const
void setUser (const std::string &user)
const std::string & password () const
void setPassword (const std::string &passwd)
unsigned short port () const
void setPort (unsigned short port)
const std::string & path () const
void setPath (const std::string &path)
URLoperator= (const URL &url)
URLoperator= (const std::string &url) throw (InvalidURL,NetDbError)
bool operator== (const URL &url) const
std::string str () const

Friends

PNET_EXPORT friend std::ostream & operator<< (std::ostream &os, const URL &url)
PNET_EXPORT friend std::istream & operator>> (std::istream &is, URL &url) throw (InvalidURL)


Detailed Description

Uniform resource locator.

This class is used to parse and store uniform resource locators. When storing a URL with password the password will not be printed out by the operator<< but can be retrieved via password().

Author:
Christian Prochnow <cproch@seculogix.de>

Definition at line 51 of file purl.h.


Constructor & Destructor Documentation

P::URL::URL  ) 
 

Default constructor.

Initializes the URL to 'file:///'

P::URL::URL const std::string &  url  )  throw (InvalidURL,NetDbError)
 

Parse URL constructor.

P::URL::URL const URL url  ) 
 

P::URL::~URL  ) 
 


Member Function Documentation

const std::string& P::URL::host  )  const [inline]
 

Definition at line 71 of file purl.h.

URL& P::URL::operator= const std::string &  url  )  throw (InvalidURL,NetDbError)
 

URL& P::URL::operator= const URL url  ) 
 

bool P::URL::operator== const URL url  )  const
 

const std::string& P::URL::password  )  const [inline]
 

Definition at line 81 of file purl.h.

const std::string& P::URL::path  )  const [inline]
 

Definition at line 91 of file purl.h.

unsigned short P::URL::port  )  const [inline]
 

Definition at line 86 of file purl.h.

const std::string& P::URL::protocol  )  const [inline]
 

Definition at line 66 of file purl.h.

void P::URL::setHost const std::string &  host  ) 
 

void P::URL::setPassword const std::string &  passwd  ) 
 

void P::URL::setPath const std::string &  path  ) 
 

void P::URL::setPort unsigned short  port  ) 
 

void P::URL::setProtocol const std::string &  proto,
bool  setPort = true
 

void P::URL::setUser const std::string &  user  ) 
 

std::string P::URL::str  )  const
 

const std::string& P::URL::user  )  const [inline]
 

Definition at line 76 of file purl.h.


Friends And Related Function Documentation

PNET_EXPORT friend std::ostream& operator<< std::ostream &  os,
const URL url
[friend]
 

PNET_EXPORT friend std::istream& operator>> std::istream &  is,
URL url
throw (InvalidURL) [friend]
 


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:37 2004 for P::Classes by doxygen 1.3.3