Quick Links:

bmqa | bmqpi | bmqt

Public Member Functions | Friends

bmqa::QueueId Class Reference

#include <bmqa_queueid.h>

List of all members.

Public Member Functions

 QueueId (bslma::Allocator *allocator=0)
 QueueId (const QueueId &other, bslma::Allocator *allocator=0)
 QueueId (const bmqt::CorrelationId &correlationId, bslma::Allocator *allocator=0)
 QueueId (bsls::Types::Int64 numeric, bslma::Allocator *allocator=0)
 QueueId (void *pointer, bslma::Allocator *allocator=0)
 QueueId (const bsl::shared_ptr< void > &sharedPtr, bslma::Allocator *allocator=0)
QueueIdoperator= (const QueueId &rhs)
const bmqt::CorrelationIdcorrelationId () const
bsls::Types::Uint64 flags () const
const bmqt::Uriuri () const
const bmqt::QueueOptionsoptions () const
bool isValid () const
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const

Friends

bool operator== (const QueueId &lhs, const QueueId &rhs)
bool operator!= (const QueueId &lhs, const QueueId &rhs)
bool operator< (const QueueId &lhs, const QueueId &rhs)

Detailed Description

Value-semantic efficient identifier for a queue

See Component bmqa_queueid


Constructor & Destructor Documentation

bmqa::QueueId::QueueId ( bslma::Allocator *  allocator = 0  )  [explicit]

Default constructor. Create a new QueueId associated with an automatically generated correlation Id, using the optionally specified allocator.

bmqa::QueueId::QueueId ( const QueueId other,
bslma::Allocator *  allocator = 0 
)

Copy constructor, create a new queueId having the same values as the specified other, and using the optionally specified allocator.

bmqa::QueueId::QueueId ( const bmqt::CorrelationId correlationId,
bslma::Allocator *  allocator = 0 
) [explicit]

Create a new QueueId associated to the correlation Id having the specified correlationId value, using the optionally specified allocator.

bmqa::QueueId::QueueId ( bsls::Types::Int64  numeric,
bslma::Allocator *  allocator = 0 
) [explicit]

Create a new QueueId associated to the correlation Id having the specified numeric correlationId value, using the optionally specified allocator.

bmqa::QueueId::QueueId ( void *  pointer,
bslma::Allocator *  allocator = 0 
) [explicit]

Create a new QueueId associated to the correlation Id having the specified pointer correlationId value, using the optionally specified allocator.

bmqa::QueueId::QueueId ( const bsl::shared_ptr< void > &  sharedPtr,
bslma::Allocator *  allocator = 0 
) [explicit]

Create a new QueueId associated to the correlation Id having the specified sharedPtr correlationId value, using the optionally specified allocator. The lifetime of sharedPtr is tied to this object, and it is the responsibility of the user to manage it accordingly.


Member Function Documentation

QueueId& bmqa::QueueId::operator= ( const QueueId rhs  ) 

Assignment operator, from the specified rhs using the specified allocator.

const bmqt::CorrelationId& bmqa::QueueId::correlationId (  )  const

Return the correlationId associated to this QueueId. The behavior is undefined unless this QueueId is valid.

bsls::Types::Uint64 bmqa::QueueId::flags (  )  const

Return the flags used when opening this queue.

const bmqt::Uri& bmqa::QueueId::uri (  )  const

Return the URI associated to this QueueId. The behavior is undefined unless this QueueId is valid.

const bmqt::QueueOptions& bmqa::QueueId::options (  )  const

Return the options used when opening this queue.

bool bmqa::QueueId::isValid (  )  const

Return whether this QueueId is valid, i.e., is associated to an opened queue.

bsl::ostream& bmqa::QueueId::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

bool operator== ( const QueueId lhs,
const QueueId rhs 
) [friend]

Return true if rhs object contains the value of the same type as contained in lhs object and the value itself is the same in both objects, return false otherwise.

bool operator!= ( const QueueId lhs,
const QueueId rhs 
) [friend]

Return false if rhs object contains the value of the same type as contained in lhs object and the value itself is the same in both objects, return true otherwise.

bool operator< ( const QueueId lhs,
const QueueId rhs 
) [friend]

Operator used to allow comparison between the specified lhs and rhs CorrelationId objects so that CorrelationId can be used as key in a map.


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