1#ifndef PROTON_TYPE_ID_HPP
2#define PROTON_TYPE_ID_HPP
28#include "./internal/export.hpp"
30#include <proton/codec.h>
79inline 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); }
82inline 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); }
88inline bool type_id_is_scalar(
type_id t) {
89 return type_id_is_integral(t) ||
90 type_id_is_floating_point(t) ||
91 type_id_is_decimal(t) ||
92 type_id_is_string_like(t) ||
The main Proton namespace.
Definition: annotation_key.hpp:33
std::string type_name(type_id)
Get the name of the AMQP type.
type_id
An identifier for AMQP types.
Definition: type_id.hpp:37
@ ARRAY
A sequence of values of the same type.
Definition: type_id.hpp:60
@ LIST
A sequence of values of mixed types.
Definition: type_id.hpp:61
@ UBYTE
Unsigned 8-bit integer.
Definition: type_id.hpp:40
@ DOUBLE
64-bit binary floating point.
Definition: type_id.hpp:51
@ TIMESTAMP
Signed 64-bit milliseconds since the epoch.
Definition: type_id.hpp:49
@ CHAR
32-bit unicode character.
Definition: type_id.hpp:46
@ UINT
Unsigned 32-bit integer.
Definition: type_id.hpp:44
@ MAP
A sequence of key-value pairs.
Definition: type_id.hpp:62
@ ULONG
Unsigned 64-bit integer.
Definition: type_id.hpp:47
@ DESCRIBED
A descriptor and a value.
Definition: type_id.hpp:59
@ NULL_TYPE
The null type, contains no data.
Definition: type_id.hpp:38
@ SHORT
Signed 16-bit integer.
Definition: type_id.hpp:43
@ BOOLEAN
Boolean true or false.
Definition: type_id.hpp:39
@ DECIMAL32
32-bit decimal floating point.
Definition: type_id.hpp:52
@ DECIMAL64
64-bit decimal floating point.
Definition: type_id.hpp:53
@ USHORT
Unsigned 16-bit integer.
Definition: type_id.hpp:42
@ FLOAT
32-bit binary floating point.
Definition: type_id.hpp:50
@ BYTE
Signed 8-bit integer.
Definition: type_id.hpp:41
@ LONG
Signed 64-bit integer.
Definition: type_id.hpp:48
@ UUID
16-byte UUID.
Definition: type_id.hpp:55
@ DECIMAL128
128-bit decimal floating point.
Definition: type_id.hpp:54
@ SYMBOL
Variable-length encoded string.
Definition: type_id.hpp:58
@ BINARY
Variable-length sequence of bytes.
Definition: type_id.hpp:56
@ STRING
Variable-length utf8-encoded string.
Definition: type_id.hpp:57
@ INT
Signed 32-bit integer.
Definition: type_id.hpp:45
std::ostream & operator<<(std::ostream &, const binary &)
Print a binary value.
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.