Quick Links:

bmqa | bmqpi | bmqt

Public Member Functions | Static Public Attributes | Friends

bmqt::Uri Class Reference

#include <bmqt_uri.h>

List of all members.

Public Member Functions

 Uri (bslma::Allocator *allocator=0)
 Uri (const Uri &original, bslma::Allocator *allocator=0)
 Uri (const bsl::string &uri, bslma::Allocator *allocator=0)
 Uri (const bslstl::StringRef &uri, bslma::Allocator *allocator=0)
 Uri (const char *uri, bslma::Allocator *allocator=0)
 ~Uri ()
Urioperator= (const Uri &rhs)
const bsl::string & asString () const
bool isValid () const
bool isCanonical () const
const bslstl::StringRef & scheme () const
const bslstl::StringRef & authority () const
const bslstl::StringRef & path () const
const bslstl::StringRef & qualifiedDomain () const
const bslstl::StringRef & domain () const
const bslstl::StringRef & tier () const
const bslstl::StringRef & queue () const
const bslstl::StringRef & id () const
bslstl::StringRef canonical () const
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const

Static Public Attributes

static const int k_QUEUENAME_MAX_LENGTH = 64

Friends

struct UriParser
class UriBuilder
template<class HASH_ALGORITHM >
void hashAppend (HASH_ALGORITHM &hashAlgo, const Uri &uri)

Detailed Description

Value semantic type representing a URI

See Component bmqt_uri


Constructor & Destructor Documentation

bmqt::Uri::Uri ( bslma::Allocator *  allocator = 0  )  [explicit]

Constructor of an invalid Uri with all fields empty, using the optionally specified allocator.

bmqt::Uri::Uri ( const Uri original,
bslma::Allocator *  allocator = 0 
)

IMPLICIT: Copy constructor, create a new Uri having the same values as the specified original, and using the optionally specified allocator.

bmqt::Uri::Uri ( const bsl::string &  uri,
bslma::Allocator *  allocator = 0 
)

IMPLICIT:

bmqt::Uri::Uri ( const bslstl::StringRef &  uri,
bslma::Allocator *  allocator = 0 
)

IMPLICIT:

bmqt::Uri::Uri ( const char *  uri,
bslma::Allocator *  allocator = 0 
)

IMPLICIT: Implicit constructor of this object from the specified uri string using the optionally specified allocator. If the uri input string doesn't not represent a valid URI, this object is left in an invalid state (isValid() will return false).

bmqt::Uri::~Uri (  ) 

Destructor.


Member Function Documentation

Uri& bmqt::Uri::operator= ( const Uri rhs  ) 

Set the value of this object to the specified rhs.

const bsl::string& bmqt::Uri::asString (  )  const

Return the string representation of this URI.

bool bmqt::Uri::isValid (  )  const

Return true if this object represents a valid URI.

bool bmqt::Uri::isCanonical (  )  const

Return true if this object represents a canonical URI.

const bslstl::StringRef& bmqt::Uri::scheme (  )  const
const bslstl::StringRef& bmqt::Uri::authority (  )  const
const bslstl::StringRef& bmqt::Uri::path (  )  const

Return the corresponding (raw) part of the URI, matching to the URI RFC terminology.

const bslstl::StringRef& bmqt::Uri::qualifiedDomain (  )  const
const bslstl::StringRef& bmqt::Uri::domain (  )  const
const bslstl::StringRef& bmqt::Uri::tier (  )  const
const bslstl::StringRef& bmqt::Uri::queue (  )  const
const bslstl::StringRef& bmqt::Uri::id (  )  const

Return the corresponding (extracted) part of the URI, provided as convenient accessors using the BlazingMQ terminology.

bslstl::StringRef bmqt::Uri::canonical (  )  const

Return the canonical form of the URI. Note that canonical form includes everything except the query part of the URI.

bsl::ostream& bmqt::Uri::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect.


Friends And Related Function Documentation

friend struct UriParser [friend]
friend class UriBuilder [friend]
template<class HASH_ALGORITHM >
void hashAppend ( HASH_ALGORITHM &  hashAlgo,
const Uri uri 
) [friend]

Member Data Documentation

const int bmqt::Uri::k_QUEUENAME_MAX_LENGTH = 64 [static]

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