|
Quick Links: |
#include <bmqt_correlationid.h>
Public Types | |
| enum | Type { e_NUMERIC, e_POINTER, e_SHARED_PTR, e_AUTO_VALUE, e_UNSET } |
Public Member Functions | |
| CorrelationId () | |
| CorrelationId (bsls::Types::Int64 numeric) | |
| CorrelationId (void *pointer) | |
| CorrelationId (const bsl::shared_ptr< void > &sharedPtr) | |
| CorrelationId & | makeUnset () |
| CorrelationId & | setNumeric (bsls::Types::Int64 numeric) |
| CorrelationId & | setPointer (void *pointer) |
| CorrelationId & | setSharedPointer (const bsl::shared_ptr< void > &sharedPtr) |
| bool | isUnset () const |
| 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 |
| 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.
See Component bmqt_correlationid
| e_NUMERIC |
the |
| e_POINTER |
the |
| e_SHARED_PTR |
the |
| e_AUTO_VALUE |
the |
| e_UNSET |
the |
| bmqt::CorrelationId::CorrelationId | ( | ) | [explicit] |
Create a CorrelationId having the default, unset, value.
| bmqt::CorrelationId::CorrelationId | ( | bsls::Types::Int64 | numeric | ) | [explicit] |
Create a CorrelationId object initialized with the specified numeric integer value.
| bmqt::CorrelationId::CorrelationId | ( | void * | pointer | ) | [explicit] |
Create a CorrelationId object initialized with the specified pointer value.
| bmqt::CorrelationId::CorrelationId | ( | const bsl::shared_ptr< void > & | sharedPtr | ) | [explicit] |
Create a CorrelationId object initialized with the specified sharedPtr shared pointer value.
| static CorrelationId bmqt::CorrelationId::autoValue | ( | ) | [static] |
Return a CorrelationId having a unique, automatically assigned opaque value.
| CorrelationId& bmqt::CorrelationId::makeUnset | ( | ) |
Unset the value of this object.
| CorrelationId& bmqt::CorrelationId::setNumeric | ( | bsls::Types::Int64 | numeric | ) |
Set the value of this object value to the specified numeric. Return a reference to this object.
| CorrelationId& bmqt::CorrelationId::setPointer | ( | void * | pointer | ) |
Set the value of this object value to the specified pointer. Return a reference to this object.
| CorrelationId& bmqt::CorrelationId::setSharedPointer | ( | const bsl::shared_ptr< void > & | sharedPtr | ) |
Set the value of this object value to the specified sharedPtr. Return a reference to this object.
| bool bmqt::CorrelationId::isUnset | ( | ) | const |
Return true if the value of this object is unset;
| bool bmqt::CorrelationId::isNumeric | ( | ) | const |
Return true if the value of this object is an integer value, and otherwise return false.
| bool bmqt::CorrelationId::isPointer | ( | ) | const |
Return true if the value of this object is a pointer value, and otherwise return false.
| bool bmqt::CorrelationId::isSharedPtr | ( | ) | const |
Return true if the value of this object is a shared pointer value, and otherwise return false.
| bool bmqt::CorrelationId::isAutoValue | ( | ) | const |
Return true if the value of this object is an auto correlation value, and otherwise return false.
| bsls::Types::Int64 bmqt::CorrelationId::theNumeric | ( | ) | const |
Return the 64-bit integer value of this object. The behavior is undefined unless method isNumeric returns true.
| void* bmqt::CorrelationId::thePointer | ( | ) | const |
Return the pointer value of this object. The behavior is undefined unless method isPointer returns true.
| const bsl::shared_ptr<void>& bmqt::CorrelationId::theSharedPtr | ( | ) | const |
Return the pointer value of this object. The behavior is undefined unless method isSharedPtr returns true.
| Type bmqt::CorrelationId::type | ( | ) | const |
Return the type of the value of this object.
| bsl::ostream& 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.
friend struct CorrelationIdLess [friend] |
| bool operator== | ( | const CorrelationId & | lhs, | |
| const CorrelationId & | 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 CorrelationId & | lhs, | |
| const CorrelationId & | 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.
| bsl::ostream& operator<< | ( | bsl::ostream & | stream, | |
| const CorrelationId & | rhs | |||
| ) | [friend] |
Format the specified rhs to the specified output stream and return a reference to the modifiable stream.
| void hashAppend | ( | HASH_ALGORITHM & | hashAlgo, | |
| const CorrelationId & | value | |||
| ) | [friend] |
1.7.1