Go to the documentation of this file. 1 #ifndef PROTON_TYPE_ID_HPP
2 #define PROTON_TYPE_ID_HPP
29 #include "./internal/export.hpp"
31 #include <proton/codec.h>
80 inline bool type_id_is_integral(
type_id t) {
return t ==
BOOLEAN || t ==
CHAR || t ==
TIMESTAMP || type_id_is_unsigned_int(t) || type_id_is_signed_int(t); }
83 inline bool type_id_is_signed(
type_id t) {
return type_id_is_signed_int(t) || type_id_is_floating_point(t) || type_id_is_decimal(t); }
86 inline bool type_id_is_scalar(
type_id t) {
return type_id_is_integral(t) || type_id_is_floating_point(t) || type_id_is_decimal(t) || type_id_is_string_like(t) || t ==
TIMESTAMP || t ==
UUID; }
92 #endif // PROTON_TYPE_ID_HPP
Signed 64-bit milliseconds since the epoch.
Definition: type_id.hpp:50
Unsigned 8-bit integer.
Definition: type_id.hpp:41
128-bit decimal floating point.
Definition: type_id.hpp:55
A sequence of values of mixed types.
Definition: type_id.hpp:62
Boolean true or false.
Definition: type_id.hpp:40
A descriptor and a value.
Definition: type_id.hpp:60
A sequence of key-value pairs.
Definition: type_id.hpp:63
Signed 32-bit integer.
Definition: type_id.hpp:46
std::ostream & operator<<(std::ostream &, const binary &)
Print a binary value.
Unsigned 32-bit integer.
Definition: type_id.hpp:45
Unsigned 64-bit integer.
Definition: type_id.hpp:48
32-bit binary floating point.
Definition: type_id.hpp:51
The null type, contains no data.
Definition: type_id.hpp:39
16-byte UUID.
Definition: type_id.hpp:56
32-bit decimal floating point.
Definition: type_id.hpp:53
Unsigned 16-bit integer.
Definition: type_id.hpp:43
Signed 8-bit integer.
Definition: type_id.hpp:42
type_id
An identifier for AMQP types.
Definition: type_id.hpp:38
Signed 64-bit integer.
Definition: type_id.hpp:49
Variable-length sequence of bytes.
Definition: type_id.hpp:57
Signed 16-bit integer.
Definition: type_id.hpp:44
A sequence of values of the same type.
Definition: type_id.hpp:61
32-bit unicode character.
Definition: type_id.hpp:47
64-bit binary floating point.
Definition: type_id.hpp:52
The main Proton namespace.
Definition: annotation_key.hpp:30
std::string type_name(type_id)
Get the name of the AMQP type.
Variable-length utf8-encoded string.
Definition: type_id.hpp:58
Variable-length encoded string.
Definition: type_id.hpp:59
64-bit decimal floating point.
Definition: type_id.hpp:54
void assert_type_equal(type_id want, type_id got)
Throw a conversion_error if want != got with a message including the names of the types.