Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::CURIComponents Class Reference

URI handling (hopefully) according to RFC2396. More...

#include <URIComponents.h>

List of all members.

Public Member Functions

 CURIComponents::CURIComponents ()
 Default constructor.
 CURIComponents::CURIComponents (const char *uriString, std::string::size_type uriStringLen)
 Constructor which parses the passed in uri.
 CURIComponents::CURIComponents (const std::string &uriString)
 Constructor which parses the passed in uri.
void parse (const char *uriString, std::string::size_type uriStringLen)
 Parse the passed in uri.
void parse (const std::string &uriString)
 Parse the passed in uri.
std::string make () const
 Reassemble the uri components to make a complete URI.
void resolve (const CURIComponents &base)
 Resolve this URI relative to another, according to RFC2396.
void resolve (const char *base, const std::string::size_type baseLen)
 Resolve this URI relative to another.
void resolve (const std::string &base)
 Resolve this URI relative to another.
void reset ()
 Reset the object to the default state.
const std::string & getScheme () const
 Get the scheme component.
bool isSchemeDefined () const
 See if the scheme component is defined.
void setScheme (const char *scheme)
 Set the scheme component.
void setScheme (const std::string &scheme)
 Set the scheme component.
const std::string & getAuthority () const
 Get the authority component.
bool isAuthorityDefined () const
 See if the authority component is defined.
void setAuthority (const char *authority)
 Set the authority component.
void setAuthority (const std::string &authority)
 Set the authority component.
const std::string & getPath () const
 Get the path component.
void setPath (const char *path)
 Set the path component.
void setPath (const std::string &path)
 Set the path component.
const std::string & getQuery () const
 Get function to get the query component.
bool isQueryDefined () const
 See if the query component is defined.
void setQuery (const char *query)
 Set the query component.
void setQuery (const std::string &query)
 Set the query component.
const std::string & getFragment () const
 Get the fragment component.
bool isFragmentDefined () const
 See if the fragment component is defined.
void setFragment (const char *fragment)
 Set the fragment component.
void setFragment (const std::string &fragment)
 Set the fragment component.
unsigned int getDefined () const
 Get the defined components mask.
void setDefined (unsigned int defined)
 Set the defined components mask.

Static Public Member Functions

std::string resolve (const char *relative, std::string::size_type relativeLen, const char *base, std::string::size_type baseLen)
 Resolve the one URI relative to another.
std::string resolve (const std::string &relative, const std::string &base)
 Resolve the one URI relative to another.

Static Public Attributes

const int d_scheme = 1
const int d_authority = 2
const int d_query = 4
const int d_fragment = 8


Detailed Description

URI handling (hopefully) according to RFC2396.


Member Function Documentation

OW32::CURIComponents::CURIComponents::CURIComponents const std::string &  uriString  )  [inline]
 

Constructor which parses the passed in uri.

Parameters:
uriString URI to parse

OW32::CURIComponents::CURIComponents::CURIComponents const char *  uriString,
std::string::size_type  uriStringLen
[inline]
 

Constructor which parses the passed in uri.

Parameters:
uriString URI to parse
uriStringLen Length of the URI string

unsigned int OW32::CURIComponents::getDefined  )  const [inline]
 

Get the defined components mask.

bool OW32::CURIComponents::isAuthorityDefined  )  const [inline]
 

See if the authority component is defined.

bool OW32::CURIComponents::isFragmentDefined  )  const [inline]
 

See if the fragment component is defined.

bool OW32::CURIComponents::isQueryDefined  )  const [inline]
 

See if the query component is defined.

bool OW32::CURIComponents::isSchemeDefined  )  const [inline]
 

See if the scheme component is defined.

std::string OW32::CURIComponents::make  )  const
 

Reassemble the uri components to make a complete URI.

Returns:
The reassembled URI

void OW32::CURIComponents::parse const std::string &  uriString  )  [inline]
 

Parse the passed in uri.

Parameters:
uriString URI to parse
uriStringLen Length of the URI string

void OW32::CURIComponents::parse const char *  uriString,
std::string::size_type  uriStringLen
 

Parse the passed in uri.

Parameters:
uriString URI to parse
uriStringLen Length of the URI string

std::string OW32::CURIComponents::resolve const std::string &  relative,
const std::string &  base
[inline, static]
 

Resolve the one URI relative to another.

The URI string to resolve The base URI string

std::string OW32::CURIComponents::resolve const char *  relative,
std::string::size_type  relativeLen,
const char *  base,
std::string::size_type  baseLen
[static]
 

Resolve the one URI relative to another.

The URI string to resolve The lengh of the relative URI string The base URI string The length of the base URI string

void OW32::CURIComponents::resolve const std::string &  base  )  [inline]
 

Resolve this URI relative to another.

Parameters:
base The base URI string

void OW32::CURIComponents::resolve const char *  base,
const std::string::size_type  baseLen
[inline]
 

Resolve this URI relative to another.

Parameters:
base The base URI string
baseLen The length of the base URI

void OW32::CURIComponents::resolve const CURIComponents base  ) 
 

Resolve this URI relative to another, according to RFC2396.

Parameters:
base The base URI to use during resolution.

void OW32::CURIComponents::setAuthority const std::string &  authority  )  [inline]
 

Set the authority component.

Also sets the authority defined flag.

void OW32::CURIComponents::setAuthority const char *  authority  )  [inline]
 

Set the authority component.

Also sets the authority defined flag.

void OW32::CURIComponents::setDefined unsigned int  defined  )  [inline]
 

Set the defined components mask.

void OW32::CURIComponents::setFragment const std::string &  fragment  )  [inline]
 

Set the fragment component.

Also sets the fragment defined flag.

void OW32::CURIComponents::setFragment const char *  fragment  )  [inline]
 

Set the fragment component.

Also sets the fragment defined flag.

void OW32::CURIComponents::setPath const std::string &  path  )  [inline]
 

Set the path component.

void OW32::CURIComponents::setPath const char *  path  )  [inline]
 

Set the path component.

void OW32::CURIComponents::setQuery const std::string &  query  )  [inline]
 

Set the query component.

Also sets the query defined flag.

void OW32::CURIComponents::setQuery const char *  query  )  [inline]
 

Set the query component.

Also sets the query defined flag.

void OW32::CURIComponents::setScheme const std::string &  scheme  )  [inline]
 

Set the scheme component.

Also sets the scheme defined flag.

void OW32::CURIComponents::setScheme const char *  scheme  )  [inline]
 

Set the scheme component.

Also sets the scheme defined flag.


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:29 2005 for OW32 by  doxygen 1.3.9.1