uripp Namespace Reference


Detailed Description

URI library.


Classes

class  authority
 URI authority component (without userinfo). More...
class  domain_name
 Domain name. More...
class  fragment
 URI fragment component. More...
class  ip_address
 IP address. More...
class  ipv6_address
 IP v6 address. More...
class  path
 URI path component. More...
class  query
 URI query component. More...
class  scheme
 URI scheme component. More...
class  uri
 Uniform Resource Identifier (URI) reference. More...

Namespaces

namespace  urisyn
 URI syntax declarations.

Functions

std::ostream & operator<< (std::ostream &os, const authority &v)
 Stream out URI authority.
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, authority &v)
std::ostream & operator<< (std::ostream &os, const domain_name &v)
 Stream out domain name.
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, domain_name &v)
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, fragment &v, std::string *errs=0)
std::ostream & operator<< (std::ostream &os, const fragment &v)
 Stream out fragment encoding.
std::ostream & operator<< (std::ostream &os, const ip_address &v)
 Stream out IP address.
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, ip_address &v)
std::ostream & operator<< (std::ostream &os, const ipv6_address &v)
 Stream out IP v6 address.
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, ipv6_address &v)
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, path &v, std::string *errs=0)
std::string URIPP_API convert (const path &v)
bool URIPP_API convert (const std::string &s, path &v)
std::ostream & operator<< (std::ostream &os, const path &v)
 Stream out path encoding.
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, query &v, std::string *errs=0)
std::ostream & operator<< (std::ostream &os, const query &v)
 Stream out query encoding.
std::ostream & operator<< (std::ostream &os, const scheme &v)
 Stream out URI scheme.
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, scheme &v, char *endc=0)
bool URIPP_API parse (std::string::const_iterator &first, std::string::const_iterator last, uri &v, std::string *errs=0)
std::ostream & operator<< (std::ostream &os, const uri &v)
 Stream out URI encoding.
std::string URIPP_API convert (bool v)
 bool to string, true="1", false="0"
std::string URIPP_API convert (int v)
 int to string
std::string URIPP_API convert (unsigned int v)
 uint to string
std::string URIPP_API convert (unsigned long int v)
 unsigned long int to string
std::string URIPP_API convert (long long int v)
 long long int to string
std::string URIPP_API convert (unsigned long long int v)
 unsigned long long int to string
std::string URIPP_API convert (ptrdiff_t v)
 ptrdiff_t to string
std::string URIPP_API convert (double v)
 double to string
std::string URIPP_API convert (const std::string &v)
 string to trimmed string
std::string convert (const char *v)
bool URIPP_API convert (const std::string &s, bool &v)
bool URIPP_API convert (const std::string &s, int &v)
bool URIPP_API convert (const std::string &s, unsigned int &v)
bool URIPP_API convert (const std::string &s, unsigned long int &v)
bool URIPP_API convert (const std::string &s, long long int &v)
bool URIPP_API convert (const std::string &s, unsigned long long int &v)
bool URIPP_API convert (const std::string &s, double &v)
bool URIPP_API convert (const std::string &s, std::string &v)
bool URIPP_API isspaces (const char *s)
bool URIPP_API parse_hex (const std::string &s, size_t pos, char &chr)
void URIPP_API append_hex (char v, std::string &s)
 Convert the char v to hex and add the 2 chars to the end of s.


Function Documentation

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
authority &  v 
)

Parse URI authority, returning whether found or not and advancing first and setting authority if found. Does not skip leading space.

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
domain_name &  v 
)

Parse domain name, returning whether found or not and advancing first and setting name if found. Does not skip leading space.

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
fragment &  v,
std::string *  errs = 0 
)

Parse URI fragment, returning whether found or not and advancing first and setting fragment if found. Does not skip leading space.

If errs is specified the following take place:

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
ip_address &  v 
)

Parse IP address, returning whether found or not and advancing first and setting address if found. Does not skip leading space.

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
ipv6_address &  v 
)

Parse IP v6 address, returning whether found or not and advancing first and setting address if found. Does not skip leading space.

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
path &  v,
std::string *  errs = 0 
)

Parse URI path, returning whether found or not and advancing first and setting path if found. Does not skip leading space.

If errs is specified the following take place:

std::string URIPP_API uripp::convert ( const path &  v  ) 

URI path to string

bool URIPP_API uripp::convert ( const std::string &  s,
path &  v 
)

String to URI path, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
query &  v,
std::string *  errs = 0 
)

Parse URI query, returning whether found or not and advancing first and setting query if found. Does not skip leading space.

If errs is specified the following take place:

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
scheme &  v,
char *  endc = 0 
)

Parse URI scheme, returning whether found or not and advancing first and setting scheme and end char if found. Does not skip leading space.

bool URIPP_API uripp::parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
uri &  v,
std::string *  errs = 0 
)

Parse URI, returning whether found or not and advancing first and setting URI if found. Does not skip leading space.

If errs is specified parsing is more lax allowing decoding and other errors and setting errs with the error messages. See the individual component parse functions for details.

std::string uripp::convert ( const char *  v  )  [inline]

cstring to string

bool URIPP_API uripp::convert ( const std::string &  s,
bool &  v 
)

String to bool, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK. The following, and their uppercase, qualify as true: 1, 't', "true", 'y', "yes", "on". Their complements are considered false, and all else error.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::convert ( const std::string &  s,
int &  v 
)

String to int, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::convert ( const std::string &  s,
unsigned int &  v 
)

String to unsigned int, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::convert ( const std::string &  s,
unsigned long int &  v 
)

String to size_t, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::convert ( const std::string &  s,
long long int &  v 
)

String to long long int, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::convert ( const std::string &  s,
unsigned long long int &  v 
)

String to unsigned long long int, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::convert ( const std::string &  s,
double &  v 
)

String to double, returning true if set, which is when the string is not empty or all isspace. isspace before and/or after value OK.

Exceptions:
std::invalid_argument on conversion error

bool URIPP_API uripp::convert ( const std::string &  s,
std::string &  v 
)

String to trimmed string, returning true if set, which is when the string is not empty or all isspace.

bool URIPP_API uripp::isspaces ( const char *  s  ) 

Test if string is empty or all isspace.

bool URIPP_API uripp::parse_hex ( const std::string &  s,
size_t  pos,
char &  chr 
)

Parse hex chars at pos, returning success, and set the char and advance first on success.


Generated on Wed May 13 09:06:22 2009 for uripp by  doxygen 1.4.7