1 #ifndef PROTON_MESSAGE_ID_HPP 2 #define PROTON_MESSAGE_ID_HPP 25 #include "./binary.hpp" 26 #include "./scalar_base.hpp" 29 #include <proton/type_compat.h> 56 message_id& operator=(uint64_t x) { put_(x);
return *
this; }
59 message_id& operator=(
const std::string& x) { put_(x);
return *
this; }
78 template<>
inline uint64_t get<uint64_t>(
const message_id& x) {
return internal::get<uint64_t>(x); }
80 template<>
inline uuid get<uuid>(
const message_id& x) {
return internal::get<uuid>(x); }
82 template<>
inline binary get<binary>(
const message_id& x) {
return internal::get<binary>(x); }
84 template<>
inline std::string get<std::string>(
const message_id& x) {
return internal::get<std::string>(x); }
92 #endif // PROTON_MESSAGE_ID_HPP An AMQP message.
Definition: message.hpp:47
T coerce(const message_id &x)
Coerce the contained value to type T.
Definition: message_id.hpp:88
A 16-byte universally unique identifier.
Definition: uuid.hpp:34
Base class for scalar types.
Definition: scalar_base.hpp:57
message_id(const T &x)
Construct from any type that can be assigned.
Definition: message_id.hpp:50
Arbitrary binary data.
Definition: binary.hpp:37
message_id & operator=(const char *x)
Treated as amqp::STRING.
Definition: message_id.hpp:60
The main Proton namespace.
Definition: annotation_key.hpp:30
Experimental - Stream-like decoder from AMQP bytes to C++ values.
Definition: decoder.hpp:53
An AMQP message ID.
Definition: message_id.hpp:44
message_id()
An empty message_id.
Definition: message_id.hpp:47