1 #ifndef PROTON_SCALAR_HPP 2 #define PROTON_SCALAR_HPP 27 #include <proton/type_compat.h> 43 template <
class T>
scalar(
const T& x) { *
this = x; }
60 template<
class T> T
get(
const scalar& s) {
return internal::get<T>(s); }
72 template<
class T> T
coerce(
const scalar& x) {
return internal::coerce<T>(x); }
85 template<
class T> T
coerce(
scalar& x) {
return internal::coerce<T>(x); }
89 #endif // PROTON_SCALAR_HPP A holder for an instance of any scalar AMQP type.
Definition: scalar.hpp:37
The base class for scalar types.
Definition: scalar_base.hpp:60
scalar & operator=(const T &x)
Assign from any scalar type.
Definition: scalar.hpp:46
The base class for scalar types.
T coerce(const annotation_key &x)
Get the binary value or throw conversion_error.
Definition: annotation_key.hpp:83
void clear()
Clear the scalar, making it empty().
Definition: scalar.hpp:49
scalar(const T &x)
Construct from any scalar type.
Definition: scalar.hpp:43
scalar()
Create an empty scalar.
Definition: scalar.hpp:40
The type of the AMQP null value.
The main Proton namespace.
Definition: annotation_key.hpp:33
The type of the AMQP null value.
Definition: null.hpp:39