libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
BloombergLP::bmqa::QueueId Class Reference

Value-semantic efficient identifier for a queue.

#include <bmqa_queueid.h>

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
 Return the flags used when opening this queue. More...
 
const bmqt::Uriuri () const
 
const bmqt::QueueOptionsoptions () const
 Return the options used when opening this queue. More...
 
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)
 

Constructor & Destructor Documentation

◆ QueueId() [1/6]

BloombergLP::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.

◆ QueueId() [2/6]

BloombergLP::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.

◆ QueueId() [3/6]

BloombergLP::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.

◆ QueueId() [4/6]

BloombergLP::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.

◆ QueueId() [5/6]

BloombergLP::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.

◆ QueueId() [6/6]

BloombergLP::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

◆ operator=()

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

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

◆ correlationId()

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

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

◆ flags()

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

◆ uri()

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

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

◆ options()

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

◆ isValid()

bool BloombergLP::bmqa::QueueId::isValid ( ) const

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

◆ print()

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

◆ operator==

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.

◆ operator!=

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.

◆ operator<

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: