Public Member Functions | Static Public Member Functions

Swift::URL Class Reference

Collaboration diagram for Swift::URL:

List of all members.

Public Member Functions

 URL ()
 URL (const std::string &scheme, const std::string &host, int port, const std::string &path)
 URL (const std::string &scheme, const std::string &host, const std::string &path)
bool isEmpty () const
 Whether the URL is empty.
const std::string & getScheme () const
 Scheme used for the URL (http, https etc.
const std::string & getHost () const
 Hostname.
boost::optional< int > getPort () const
 Port number.
const std::string & getPath () const
 Path.
std::string toString () const

Static Public Member Functions

static int getPortOrDefaultPort (const URL &url)
static URL fromString (const std::string &)
static std::string unescape (const std::string &)

Detailed Description

Definition at line 16 of file URL.h.


Constructor & Destructor Documentation

Swift::URL::URL (  )  [inline]

Definition at line 19 of file URL.h.

Swift::URL::URL ( const std::string &  scheme,
const std::string &  host,
int  port,
const std::string &  path 
) [inline]

Definition at line 22 of file URL.h.

Swift::URL::URL ( const std::string &  scheme,
const std::string &  host,
const std::string &  path 
) [inline]

Definition at line 25 of file URL.h.


Member Function Documentation

static URL Swift::URL::fromString ( const std::string &   )  [static]
const std::string& Swift::URL::getHost (  )  const [inline]

Hostname.

Definition at line 45 of file URL.h.

const std::string& Swift::URL::getPath (  )  const [inline]

Path.

Definition at line 59 of file URL.h.

boost::optional<int> Swift::URL::getPort (  )  const [inline]

Port number.

Definition at line 52 of file URL.h.

static int Swift::URL::getPortOrDefaultPort ( const URL url  )  [static]
const std::string& Swift::URL::getScheme (  )  const [inline]

Scheme used for the URL (http, https etc.

)

Definition at line 38 of file URL.h.

bool Swift::URL::isEmpty (  )  const [inline]

Whether the URL is empty.

Definition at line 31 of file URL.h.

std::string Swift::URL::toString (  )  const
static std::string Swift::URL::unescape ( const std::string &   )  [static]