1 #ifndef PROTON_ANNOTATION_KEY_HPP
2 #define PROTON_ANNOTATION_KEY_HPP
28 #include <proton/type_compat.h>
49 annotation_key& operator=(
const symbol& x) { put_(x);
return *
this; }
54 annotation_key& operator=(
const std::string& x) { put_(symbol(x));
return *
this; }
55 annotation_key& operator=(
const char *x) { put_(symbol(x));
return *
this; }
60 friend class codec::decoder;
66 template <
class T> T
get(
const annotation_key& x);
A key for use with AMQP annotation maps.
Definition: annotation_key.hpp:38
T coerce(const annotation_key &x)
Get the binary value or throw conversion_error.
Definition: annotation_key.hpp:83
annotation_key()=default
An empty annotation key.
annotation_key(const T &x)
Construct from any type that can be assigned.
Definition: annotation_key.hpp:44
The base class for scalar types.
Definition: scalar_base.hpp:60
A string that represents the AMQP symbol type.
Definition: symbol.hpp:35
The main Proton namespace.
Definition: annotation_key.hpp:33
T get(const scalar &s)
Get a contained value of type T.
Definition: scalar.hpp:60
symbol get< symbol >(const annotation_key &x)
Get the symbol value or throw conversion_error.
Definition: annotation_key.hpp:77
uint64_t get< uint64_t >(const annotation_key &x)
Get the uint64_t value or throw conversion_error.
Definition: annotation_key.hpp:72
The base class for scalar types.
A string that represents the AMQP symbol type.