Loading...
Searching...
No Matches
proton::codec

Unsettled API - AMQP data encoding and decoding. More...

## Classes

struct | start
| Unsettled API - Start encoding a complex type. More...
struct | finish
| Unsettled API - Finish inserting or extracting a complex type. More...
class | decoder
| Unsettled API - A stream-like decoder from AMQP bytes to C++ values. More...
class | encoder
| Unsettled API - A stream-like encoder from C++ values to AMQP bytes. More...

## Functions

template<class T>
std::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>
std::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.

## Detailed Description

Unsettled API - AMQP data encoding and decoding.

## Class Documentation

## proton::codec::start

struct proton::codec::start

Unsettled API - Start encoding a complex type.

## proton::codec::finish

struct proton::codec::finish

Unsettled API - Finish inserting or extracting a complex type.

## Function Documentation

## operator<<() [1/3]

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.

Map entries are encoded in order they appear in the list.

## operator<<() [2/3]

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.

Allows control over the order of encoding map entries.

## operator<<() [3/3]

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.

Allows control over the order of encoding map entries.