1 #ifndef ANNOTATION_KEY_HPP
2 #define ANNOTATION_KEY_HPP
24 #include "proton/scalar.hpp"
45 annotation_key& operator=(uint64_t x) { scalar_ = x;
return *
this; }
46 annotation_key& operator=(
const amqp_symbol& x) { scalar_ = x;
return *
this; }
60 void get(uint64_t& x)
const { scalar_.get(x); }
61 void get(amqp_symbol& x)
const { scalar_.get(x); }
65 template<
class T> T
get()
const { T x;
get(x);
return x; }
68 friend PN_CPP_EXTERN encoder operator<<(encoder,
const annotation_key&);
76 #endif // ANNOTATION_KEY_HPP
An AMQP message.
Definition: message.hpp:48
A key for use with AMQP annotation maps.
Definition: annotation_key.hpp:35
annotation_key(T x)
A constructor that converts from any type that we can assign from.
Definition: annotation_key.hpp:55
annotation_key & operator=(const char *x)
char* is encoded as proton::amqp::amqp_symbol.
Definition: annotation_key.hpp:50
annotation_key & operator=(const std::string &x)
std::string is encoded as proton::amqp::amqp_symbol.
Definition: annotation_key.hpp:48
Defines C++ types representing AMQP types.
annotation_key()
Create an empty key.
Definition: annotation_key.hpp:38