Arxx::URI Class Reference

#include <URI.h>

List of all members.


Detailed Description

A URI class.


Public Member Functions

 URI (void)
 The default constructor.
 URI (const std::string &sURI)
 The constructor for URIs.
 URI (const char *pcURI)
 The constructor for URIs.
bool bIsValid (void) const
 Returns whether concatenated URI or the parts are valid.
const std::string & sGetURI (void) const
 Returns the URI in string representation.
const std::string & sGetScheme (void) const
 Returns the scheme part of the URI.
const std::string & sGetAuthority (void) const
 Returns the authority part of the URI.
const std::string & sGetPath (void) const
 Returns the path part of the URI.
const std::string & sGetQuery (void) const
 Returns the query part of the URI.
const std::string & sGetParameter (const std::string &sName) const
 Returns a specific value from the query string.
const std::string & sGetFragment (void) const
 Returns the fragment part of the URI.
void vSetURI (const std::string &sURI)
 Resets the URI.
void vSetScheme (const std::string &sScheme)
 Sets the scheme of the URI.
void vSetAuthority (const std::string &sAuthority)
 Sets the authority of the URI.
void vSetPath (const std::string &sPath)
 Sets the path of the URI.
void vSetQuery (const std::string &sQuery)
 Sets the query of the URI.
void vSetParameter (const std::string &sName, const std::string &sValue)
 Sets a part of the query of the URI.
void vSetFragment (const std::string &sFragment)
 Sets the fragment of the URI.
bool operator< (const Arxx::URI &URI) const
 Operator returning whether one URI is less than another.
void vInvalidate (void)
 Invalidates the URI object.

Private Member Functions

void vPartition (void) const
 This function partitions the URI and fills the individual parts of the URI instance.
void vPartitionQuery (void) const
 This function partitions the query part of the URI and fills the query map.
void vConcatenate (void) const
 This function concatenates the URI from the individual parts of the URI instance.
void vConcatenateQuery (void) const
 This function concatenates the query of the URI from the individual query parts in the query map.

Private Attributes

std::string m_sURI
 The string representation of this URI.
std::string m_sScheme
 The scheme part of the URI.
std::string m_sAuthority
 The authority part of the URI.
std::string m_sPath
 The path part of the URI.
std::string m_sQuery
 The query part of the URI.
std::string m_sFragment
 The fragment part of the URI.
bool m_bIsURIValid
 Indicator whether the concatenated URI is valid.
bool m_bArePartsValid
 Indicator whether the URI parts are valid.
bool m_bIsQueryValid
 Indicator whether the query part are valid.
bool m_bAreQueryPartsValid
 Indicator whether the query parts are valid.
std::map< std::string, std::string > m_Query
 The query parts of the URI.


Constructor & Destructor Documentation

Arxx::URI::URI ( void   ) 

The default constructor.

This default constructor implements an "initialized but invalid" semantic.

Arxx::URI::URI ( const std::string &  sURI  ) 

The constructor for URIs.

Parameters:
sURI The URI std::string that this object should represent.

Arxx::URI::URI ( const char *  pcURI  ) 

The constructor for URIs.

Parameters:
pcURI The URI C string that this object should represent.


Member Function Documentation

bool Arxx::URI::bIsValid ( void   )  const

Returns whether concatenated URI or the parts are valid.

bool Arxx::URI::operator< ( const Arxx::URI URI  )  const

Operator returning whether one URI is less than another.

const std::string & Arxx::URI::sGetAuthority ( void   )  const

Returns the authority part of the URI.

const std::string & Arxx::URI::sGetFragment ( void   )  const

Returns the fragment part of the URI.

const std::string & Arxx::URI::sGetParameter ( const std::string &  sName  )  const

Returns a specific value from the query string.

Parameters:
sName The name of the value to be returned.
Returns:
The value of the query parameter identified by sName or "" if the parameter could not be found.
Note:
Parameters have to be separated with '&' and `name => value` assignments are done with '='.

const std::string & Arxx::URI::sGetPath ( void   )  const

Returns the path part of the URI.

const std::string & Arxx::URI::sGetQuery ( void   )  const

Returns the query part of the URI.

const std::string & Arxx::URI::sGetScheme ( void   )  const

Returns the scheme part of the URI.

const std::string & Arxx::URI::sGetURI ( void   )  const

Returns the URI in string representation.

void Arxx::URI::vConcatenate ( void   )  const [private]

This function concatenates the URI from the individual parts of the URI instance.

void Arxx::URI::vConcatenateQuery ( void   )  const [private]

This function concatenates the query of the URI from the individual query parts in the query map.

void Arxx::URI::vInvalidate ( void   ) 

Invalidates the URI object.

void Arxx::URI::vPartition ( void   )  const [private]

This function partitions the URI and fills the individual parts of the URI instance.

void Arxx::URI::vPartitionQuery ( void   )  const [private]

This function partitions the query part of the URI and fills the query map.

void Arxx::URI::vSetAuthority ( const std::string &  sAuthority  ) 

Sets the authority of the URI.

Parameters:
sAuthority The string representation of the authority of the URI.

void Arxx::URI::vSetFragment ( const std::string &  sFragment  ) 

Sets the fragment of the URI.

Parameters:
sFragment The string representation of the fragment of the URI.

void Arxx::URI::vSetParameter ( const std::string &  sName,
const std::string &  sValue 
)

Sets a part of the query of the URI.

Parameters:
sName The name of the query parameter of the URI.
sValue The value of the query parameter of the URI.

void Arxx::URI::vSetPath ( const std::string &  sPath  ) 

Sets the path of the URI.

Parameters:
sPath The string representation of the path of the URI.

void Arxx::URI::vSetQuery ( const std::string &  sQuery  ) 

Sets the query of the URI.

Parameters:
sQuery The string representation of the query of the URI.

void Arxx::URI::vSetScheme ( const std::string &  sScheme  ) 

Sets the scheme of the URI.

Parameters:
sScheme The string representation of the scheme of the URI.

void Arxx::URI::vSetURI ( const std::string &  sURI  ) 

Resets the URI.

Parameters:
sURI The string representation of the URI.


Member Data Documentation

bool Arxx::URI::m_bArePartsValid [mutable, private]

Indicator whether the URI parts are valid.

bool Arxx::URI::m_bAreQueryPartsValid [mutable, private]

Indicator whether the query parts are valid.

If m_ArePartsValid is false this is false too.

bool Arxx::URI::m_bIsQueryValid [mutable, private]

Indicator whether the query part are valid.

bool Arxx::URI::m_bIsURIValid [mutable, private]

Indicator whether the concatenated URI is valid.

std::map< std::string, std::string > Arxx::URI::m_Query [mutable, private]

The query parts of the URI.

The parts of a query are separated by '&' and `name => value` assignment is indicated by '='.

std::string Arxx::URI::m_sAuthority [mutable, private]

The authority part of the URI.

std::string Arxx::URI::m_sFragment [mutable, private]

The fragment part of the URI.

std::string Arxx::URI::m_sPath [mutable, private]

The path part of the URI.

std::string Arxx::URI::m_sQuery [mutable, private]

The query part of the URI.

std::string Arxx::URI::m_sScheme [mutable, private]

The scheme part of the URI.

std::string Arxx::URI::m_sURI [mutable, private]

The string representation of this URI.


The documentation for this class was generated from the following files:
Generated on Tue Oct 10 11:34:57 2006 for libarxx by  doxygen 1.4.7