te::common::uri::scheme Class Reference

URI scheme component. More...

#include <scheme.h>

Public Member Functions

bool empty () const
 Test if null/empty. More...
 
bool is_null () const
 Test if null/empty. More...
 
 scheme ()
 Construct null. More...
 
 scheme (const std::string &v)
 Construct from string. More...
 
const std::string & string () const
 Get string. More...
 

Private Attributes

std::string string_
 

Friends

bool TECOMMONEXPORT parse (std::string::const_iterator &first, std::string::const_iterator last, scheme &v, char *endc)
 Parse URI scheme, returning whether found or not and advancing first and setting scheme and end char if found. More...
 

Detailed Description

URI scheme component.

Syntax:

scheme = ALPHA *( ALPHA | DIGIT | "+" | "-" | "." )
See also
http://tools.ietf.org/html/rfc3986#section-3.1

Definition at line 40 of file scheme.h.

Constructor & Destructor Documentation

te::common::uri::scheme::scheme ( )

Construct null.

te::common::uri::scheme::scheme ( const std::string &  v)

Construct from string.

This will convert to lower case and check for valid chars. Does not include the ":". Note that the string cannot be empty, it must contain chars that are valid for the scheme.

Exceptions
std::invalid_argumentif invalid

Member Function Documentation

bool te::common::uri::scheme::empty ( ) const
inline

Test if null/empty.

Definition at line 49 of file scheme.h.

bool te::common::uri::scheme::is_null ( ) const
inline

Test if null/empty.

Definition at line 50 of file scheme.h.

const std::string& te::common::uri::scheme::string ( ) const
inline

Get string.

Definition at line 51 of file scheme.h.

Referenced by te::common::uri::operator<<().

Friends And Related Function Documentation

bool TECOMMONEXPORT parse ( std::string::const_iterator &  first,
std::string::const_iterator  last,
scheme v,
char *  endc 
)
friend

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

Does not skip leading space.

Member Data Documentation

std::string te::common::uri::scheme::string_
private

Definition at line 54 of file scheme.h.


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