|
libbmq b6028b29b733bc7541593d2905a5f79a9f0192fc
|
#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. | |
| CorrelationId (bsls::Types::Int64 numeric) | |
| CorrelationId (void *pointer) | |
| CorrelationId (const bsl::shared_ptr< void > &sharedPtr) | |
| CorrelationId & | makeUnset () |
| Unset the value of this object. | |
| 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;. | |
| 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. | |
| 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 |