interreality.org [VOS]
[Home] [About]
[Screenshots]
[Download]
[News]
[Community]
[Documentation] [Manual]
[Bugs & Requests] [Wiki]

VUtil::URL Class Reference
[libvos]

#include <vos/vos/url.hh>

List of all members.


Detailed Description

A class implementing basic handling of Uniform Resource Locator (URL) expressions.

Definition at line 52 of file url.hh.

Public Member Functions

Static Public Member Functions


Constructor & Destructor Documentation

VUtil::URL::URL (  ) 

Construct a URL using the default fields.

VUtil::URL::URL ( const std::string &  protocol,
const std::string &  host,
const std::string &  port,
const std::string &  path 
)

Construct a URL using the supplied fields.

Parameters:
protocol the protocol field
host the host field
port the port field
path everything after the port

VUtil::URL::URL ( const std::string &  url  ) 

Construct a URL by parsing the supplied URL std::string.

Empty fields will be filled in using the default if they are not found!

Parameters:
url a URL in the usual form ("protocol://host:port/path")
Exceptions:
BadURLError if

VUtil::URL::URL ( const URL url  ) 


Member Function Documentation

std::string VUtil::URL::getAllButPath (  )  const

Returns:
everything but the path in the form "proto://host:port"

std::string VUtil::URL::getHost (  )  const

Returns:
the host field

std::string VUtil::URL::getHostAndPort (  )  const

Returns:
the host and port in the form "host:port"

std::string VUtil::URL::getPath (  )  const

Returns:
the path field

std::string VUtil::URL::getPort (  )  const

Returns:
the port field

std::string VUtil::URL::getProtocol (  )  const

Returns:
the protocol field

std::string VUtil::URL::getString (  )  const

Get a std::string representation of the URL in the usual form ("protocol://host:port/path").

Returns:
the URL std::string

Referenced by listChildren(), and main().

URL& VUtil::URL::operator= ( const std::string &  s  ) 

URL& VUtil::URL::operator= ( const URL u  ) 

static void VUtil::URL::setDefaults ( URL url  )  [static]

Set a URL object used to supply default fields used by the constructors.

Parameters:
url an already-initialized URL object

void VUtil::URL::setHost ( const std::string &  h  ) 

Parameters:
h set the host field

void VUtil::URL::setHostAndPort ( const std::string &  hp  ) 

Parameters:
hp set the host and port fields together, supplied in the form "host:port"

void VUtil::URL::setPath ( const std::string &  p  ) 

Parameters:
p set the path field

void VUtil::URL::setPort ( unsigned int  p  ) 

Parameters:
p set the port field

void VUtil::URL::setPort ( const std::string &  p  ) 

Parameters:
p set the port field

void VUtil::URL::setProtocol ( const std::string &  p  ) 

Parameters:
p set the protocol field


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