**Experimental** - AMQP data encoding and decoding. More...
Classes | |
struct | start |
**Experimental** - Start encoding a complex type. More... | |
struct | finish |
**Experimental** - Finish inserting or extracting a complex type. More... | |
class | decoder |
**Experimental** - Stream-like decoder from AMQP bytes to C++ values. More... | |
class | encoder |
**Experimental** - Stream-like encoder from AMQP bytes to C++ values. More... | |
Typedefs | |
Experimental - Typedefs for AMQP scalar types. | |
These typedefs associate AMQP scalar type names with the corresponding C++ types. They are provided as a convenience for those familiar with AMQP, but you do not need to use them. You can use the C++ types directly. The typedef names have a `_type` suffix to avoid ambiguity with C++ reserved and std library type names. | |
typedef bool | boolean_type |
True or false. | |
typedef uint8_t | ubyte_type |
8-bit unsigned byte | |
typedef int8_t | byte_type |
8-bit signed byte | |
typedef uint16_t | ushort_type |
16-bit unsigned short integer | |
typedef int16_t | short_type |
16-bit signed short integer | |
typedef uint32_t | uint_type |
32-bit unsigned integer | |
typedef int32_t | int_type |
32-bit signed integer | |
typedef uint64_t | ulong_type |
64-bit unsigned long integer | |
typedef int64_t | long_type |
64-bit signed long integer | |
typedef wchar_t | char_type |
32-bit unicode code point | |
typedef float | float_type |
32-bit binary floating point | |
typedef double | double_type |
64-bit binary floating point | |
typedef std::string | string_type |
An AMQP string is unicode UTF-8 encoded. | |
typedef proton::symbol | symbol_type |
An AMQP symbol is ASCII 7-bit encoded. | |
typedef proton::binary | binary_type |
An AMQP binary contains variable length raw binary data. | |
typedef proton::timestamp | timestamp_type |
A timestamp in milliseconds since the epoch 00:00:00 (UTC), 1 January 1970. | |
typedef proton::uuid | uuid_type |
A 16-byte universally unique identifier. | |
typedef proton::decimal32 | decimal32_type |
32-bit decimal floating point | |
typedef proton::decimal64 | decimal64_type |
64-bit decimal floating point | |
typedef proton::decimal128 | decimal128_type |
128-bit decimal floating point | |
Functions | |
template<class T > | |
T | get (decoder &d) |
INTERNAL XXX Document this | |
template<class T > | |
internal::enable_if < internal::is_unknown_integer < T >::value, decoder & > ::type | operator>> (decoder &d, T &i) |
operator>> for integer types that are not covered by the standard overrides. | |
template<class T , class A > | |
encoder & | operator<< (encoder &e, const std::deque< T, A > &x) |
std::deque<T> for most T is encoded as an amqp::ARRAY (same type elements) | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::deque< value, A > &x) |
std::deque<value> encodes as codec::list_type (mixed type elements) | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::deque< scalar, A > &x) |
std::deque<scalar> encodes as codec::list_type (mixed type elements) | |
template<class A , class K , class T > | |
encoder & | operator<< (encoder &e, const std::deque< std::pair< K, T >, A > &x) |
std::deque<std::pair<k,t> > encodes as codec::map_type. | |
template<class T , class A > | |
decoder & | operator>> (decoder &d, std::deque< T, A > &x) |
Decode to std::deque<T> from an amqp::LIST or amqp::ARRAY. | |
template<class A , class K , class T > | |
decoder & | operator>> (decoder &d, std::deque< std::pair< K, T >, A > &x) |
Decode to std::deque<std::pair<K, T> from an amqp::MAP. | |
encoder & | operator<< (encoder &e, const char *s) |
Treat char* as string. | |
template<class T > | |
internal::enable_if < internal::is_unknown_integer < T >::value, encoder & > ::type | operator<< (encoder &e, T i) |
operator << for integer types that are not covered by the standard overrides. | |
template<class T , class A > | |
encoder & | operator<< (encoder &e, const std::forward_list< T, A > &x) |
std::forward_list<T> for most T is encoded as an AMQP array. | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::forward_list< value, A > &x) |
Specialize for std::forward_list<value>, encode as AMQP forward_list (variable type). | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::forward_list< scalar, A > &x) |
Specialize for std::forward_list<scalar>, encode as AMQP list (variable type). | |
template<class A , class K , class T > | |
encoder & | operator<< (encoder &e, const std::forward_list< std::pair< K, T >, A > &x) |
Specialize for std::forward_list<std::pair<k,t> >, encode as AMQP map. | |
template<class T , class A > | |
decoder & | operator>> (decoder &d, std::forward_list< T, A > &x) |
Decode to std::forward_list<T> from an amqp::LIST or amqp::ARRAY. | |
template<class A , class K , class T > | |
decoder & | operator>> (decoder &d, std::forward_list< std::pair< K, T >, A > &x) |
Decode to std::forward_list<std::pair<K, T> from an amqp::MAP. | |
template<class T , class A > | |
encoder & | operator<< (encoder &e, const std::list< T, A > &x) |
std::list<T> for most T is encoded as an AMQP array. | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::list< value, A > &x) |
Specialize for std::list<value>, encode as AMQP list (variable type). | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::list< scalar, A > &x) |
Specialize for std::list<scalar>, encode as AMQP list (variable type). | |
template<class A , class K , class T > | |
encoder & | operator<< (encoder &e, const std::list< std::pair< K, T >, A > &x) |
Specialize for std::list<std::pair<k,t> >, encode as AMQP map. | |
template<class T , class A > | |
decoder & | operator>> (decoder &d, std::list< T, A > &x) |
Decode to std::list<T> from an amqp::LIST or amqp::ARRAY. | |
template<class A , class K , class T > | |
decoder & | operator>> (decoder &d, std::list< std::pair< K, T >, A > &x) |
Decode to std::list<std::pair<K, T> from an amqp::MAP. | |
template<class K , class T , class C , class A > | |
encoder & | operator<< (encoder &e, const std::map< K, T, C, A > &m) |
Encode std::map<K, T> as amqp::MAP. | |
template<class K , class T , class C , class A > | |
decoder & | operator>> (decoder &d, std::map< K, T, C, A > &m) |
Decode to std::map<K, T> from amqp::MAP. | |
template<class K , class T , class C , class A > | |
encoder & | operator<< (encoder &e, const std::unordered_map< K, T, C, A > &m) |
Encode std::unordered_map<K, T> as amqp::UNORDERED_MAP. | |
template<class K , class T , class C , class A > | |
decoder & | operator>> (decoder &d, std::unordered_map< K, T, C, A > &m) |
Decode to std::unordered_map<K, T> from amqp::UNORDERED_MAP. | |
template<class T , class A > | |
encoder & | operator<< (encoder &e, const std::vector< T, A > &x) |
Encode std::vector<T> as amqp::ARRAY (same type elements). | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::vector< value, A > &x) |
Encode std::vector<value> encode as amqp::LIST (mixed type elements). | |
template<class A > | |
encoder & | operator<< (encoder &e, const std::vector< scalar, A > &x) |
Encode std::vector<scalar> as amqp::LIST (mixed type elements). | |
template<class A , class K , class T > | |
encoder & | operator<< (encoder &e, const std::vector< std::pair< K, T >, A > &x) |
Encode std::deque<std::pair<k,t> > as amqp::MAP, preserves order of entries. | |
template<class T , class A > | |
decoder & | operator>> (decoder &d, std::vector< T, A > &x) |
Decode to std::vector<T> from an amqp::LIST or amqp::ARRAY. | |
template<class A , class K , class T > | |
decoder & | operator>> (decoder &d, std::vector< std::pair< K, T >, A > &x) |
Decode to std::vector<std::pair<K, T> from an amqp::MAP. |
**Experimental** - AMQP data encoding and decoding.
You can use these classes on an experimental basis to create your own AMQP encodings for C++ types, but they may change in the future. For examples of use see the built-in encodings, for example in proton/vector.hpp or proton/map.hpp
encoder& proton::codec::operator<< | ( | encoder & | e, | |
const std::list< std::pair< K, T >, A > & | x | |||
) | [inline] |
Specialize for std::list<std::pair<k,t> >, encode as AMQP map.
Allows control over the order of encoding map entries.
encoder& proton::codec::operator<< | ( | encoder & | e, | |
const std::forward_list< std::pair< K, T >, A > & | x | |||
) | [inline] |
Specialize for std::forward_list<std::pair<k,t> >, encode as AMQP map.
Allows control over the order of encoding map entries.
encoder& proton::codec::operator<< | ( | encoder & | e, | |
const std::deque< std::pair< K, T >, A > & | x | |||
) | [inline] |
std::deque<std::pair<k,t> > encodes as codec::map_type.
Map entries are encoded in order they appear in the list.