1 #ifndef PROTON_MESSAGE_ID_HPP 2 #define PROTON_MESSAGE_ID_HPP 25 #include "./binary.hpp" 26 #include "./internal/scalar_base.hpp" 54 message_id& operator=(uint64_t x) { put_(x);
return *
this; }
57 message_id& operator=(
const std::string& x) { put_(x);
return *
this; }
62 message_id(
const pn_atom_t& a): internal::scalar_base(a) {}
76 template<>
inline uint64_t get<uint64_t>(
const message_id& x) {
return internal::get<uint64_t>(x); }
78 template<>
inline uuid get<uuid>(
const message_id& x) {
return internal::get<uuid>(x); }
80 template<>
inline binary get<binary>(
const message_id& x) {
return internal::get<binary>(x); }
82 template<>
inline std::string get<std::string>(
const message_id& x) {
return internal::get<std::string>(x); }
90 #endif // PROTON_MESSAGE_ID_HPP An AMQP message.
Definition: message.hpp:51
T coerce(const message_id &x)
Coerce the contained value to type T.
Definition: message_id.hpp:86
A 16-byte universally unique identifier.
Definition: uuid.hpp:34
message_id(const T &x)
Construct from any type that can be assigned.
Definition: message_id.hpp:48
Arbitrary binary data.
Definition: binary.hpp:34
message_id & operator=(const char *x)
Treated as amqp::STRING.
Definition: message_id.hpp:58
Type traits for mapping between AMQP and C++ types.
Definition: annotation_key.hpp:28
Experimental - Stream-like decoder from AMQP bytes to C++ values.
Definition: decoder.hpp:51
An AMQP message ID.
Definition: message_id.hpp:42
message_id()
An empty message_id has a uint64_t value set to 0.
Definition: message_id.hpp:45