A set of key-values used to describe a DTSpan
.
#include <bmqpi_dtspan.h>
|
| Baggage (bslma::Allocator *allocator=0) |
|
const_iterator | begin () const |
| Returns a const-iterator used to iterate over key-values. More...
|
|
const_iterator | end () const |
| Returns a const-iterator representing the end of key-values. More...
|
|
bool | has (const bsl::string &key) const |
|
bsl::string_view | get (const bsl::string &key, const bsl::string_view &dflt="") const |
|
void | put (const bsl::string_view &key, const bsl::string_view &value) |
|
bool | erase (const bsl::string &key) |
|
◆ const_iterator
◆ Baggage()
BloombergLP::bmqpi::DTSpan::Baggage::Baggage |
( |
bslma::Allocator * |
allocator = 0 | ) |
|
◆ begin()
◆ end()
◆ has()
bool BloombergLP::bmqpi::DTSpan::Baggage::has |
( |
const bsl::string & |
key | ) |
const |
Returns whether this object holds a value associated with the specified key
.
◆ get()
bsl::string_view BloombergLP::bmqpi::DTSpan::Baggage::get |
( |
const bsl::string & |
key, |
|
|
const bsl::string_view & |
dflt = "" |
|
) |
| const |
Returns the value currently associated with key
, or dflt
if no associated value is currently held.
Beware that if key
is not found and the returned string_view
outlives dflt
, then the string_view
will reference a deallocated address.
◆ put()
void BloombergLP::bmqpi::DTSpan::Baggage::put |
( |
const bsl::string_view & |
key, |
|
|
const bsl::string_view & |
value |
|
) |
| |
Stores the specified value
associated with the specified key
. Note that if such a key
was already stored, then its associated value will be replaced by the supplied one.
◆ erase()
bool BloombergLP::bmqpi::DTSpan::Baggage::erase |
( |
const bsl::string & |
key | ) |
|
Erases any value currently associated with key
, and returns whether any such value was previously held.
The documentation for this class was generated from the following file: