libbmq
a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
|
#include <bmqt_correlationid.h>
Public Types | |
enum | Type { e_NUMERIC , e_POINTER , e_SHARED_PTR , e_AUTO_VALUE , e_UNSET } |
Public Member Functions | |
CorrelationId () | |
Create a CorrelationId having the default, unset, value. More... | |
CorrelationId (bsls::Types::Int64 numeric) | |
CorrelationId (void *pointer) | |
CorrelationId (const bsl::shared_ptr< void > &sharedPtr) | |
CorrelationId & | makeUnset () |
Unset the value of this object. More... | |
CorrelationId & | setNumeric (bsls::Types::Int64 numeric) |
CorrelationId & | setPointer (void *pointer) |
CorrelationId & | setSharedPointer (const bsl::shared_ptr< void > &sharedPtr) |
bool | isUnset () const |
Return true if the value of this object is unset;. More... | |
bool | isNumeric () const |
bool | isPointer () const |
bool | isSharedPtr () const |
bool | isAutoValue () const |
bsls::Types::Int64 | theNumeric () const |
void * | thePointer () const |
const bsl::shared_ptr< void > & | theSharedPtr () const |
Type | type () const |
Return the type of the value of this object. More... | |
bsl::ostream & | print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const |
Static Public Member Functions | |
static CorrelationId | autoValue () |
Friends | |
struct | CorrelationIdLess |
bool | operator== (const CorrelationId &lhs, const CorrelationId &rhs) |
bool | operator!= (const CorrelationId &lhs, const CorrelationId &rhs) |
bsl::ostream & | operator<< (bsl::ostream &stream, const CorrelationId &rhs) |
template<class HASH_ALGORITHM > | |
void | hashAppend (HASH_ALGORITHM &hashAlgo, const CorrelationId &value) |
This class implements an in-core value-semantic type for correlating an asynchronous result with the original operation.
|
inlineexplicit |
|
inlineexplicit |
Create a CorrelationId
object initialized with the specified numeric
integer value.
|
inlineexplicit |
Create a CorrelationId
object initialized with the specified pointer
value.
|
inlineexplicit |
Create a CorrelationId
object initialized with the specified sharedPtr
shared pointer value.
|
static |
Return a CorrelationId
having a unique, automatically assigned opaque value.
|
inline |
|
inline |
Set the value of this object value to the specified numeric
. Return a reference to this object.
|
inline |
Set the value of this object value to the specified pointer
. Return a reference to this object.
|
inline |
Set the value of this object value to the specified sharedPtr
. Return a reference to this object.
|
inline |
Referenced by type().
|
inline |
Return true
if the value of this object is an integer value, and otherwise return false
.
Referenced by BloombergLP::bmqt::CorrelationIdLess::operator()(), theNumeric(), and type().
|
inline |
Return true
if the value of this object is a pointer value, and otherwise return false
.
Referenced by BloombergLP::bmqt::CorrelationIdLess::operator()(), thePointer(), and type().
|
inline |
Return true
if the value of this object is a shared pointer value, and otherwise return false
.
Referenced by BloombergLP::bmqt::CorrelationIdLess::operator()(), theSharedPtr(), and type().
|
inline |
Return true
if the value of this object is an auto correlation value, and otherwise return false
.
Referenced by BloombergLP::bmqt::CorrelationIdLess::operator()(), and type().
|
inline |
Return the 64-bit integer value of this object. The behavior is undefined unless method isNumeric
returns true
.
References isNumeric().
Referenced by BloombergLP::bmqt::CorrelationIdLess::operator()().
|
inline |
Return the pointer value of this object. The behavior is undefined unless method isPointer
returns true
.
References isPointer().
Referenced by BloombergLP::bmqt::CorrelationIdLess::operator()().
|
inline |
Return the pointer value of this object. The behavior is undefined unless method isSharedPtr
returns true
.
References isSharedPtr().
Referenced by BloombergLP::bmqt::CorrelationIdLess::operator()().
|
inline |
References e_AUTO_VALUE, e_NUMERIC, e_POINTER, e_SHARED_PTR, e_UNSET, isAutoValue(), isNumeric(), isPointer(), isSharedPtr(), and isUnset().
bsl::ostream& BloombergLP::bmqt::CorrelationId::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.
Referenced by BloombergLP::bmqt::operator<<().
|
friend |
|
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.
|
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.
|
friend |
Format the specified rhs
to the specified output stream
and return a reference to the modifiable stream
.
|
friend |