Qpid Proton C++ API  0.17.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
proton::codec Namespace Reference

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 C++ values to AMQP bytes. More...
 

Functions

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. More...
 
template<class T , class A >
encoderoperator<< (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 >
encoderoperator<< (encoder &e, const std::deque< value, A > &x)
 std::deque<value> encodes as codec::list_type (mixed type elements)
 
template<class A >
encoderoperator<< (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 >
encoderoperator<< (encoder &e, const std::deque< std::pair< K, T >, A > &x)
 std::deque<std::pair<k,t> > encodes as codec::map_type. More...
 
template<class T , class A >
decoderoperator>> (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 >
decoderoperator>> (decoder &d, std::deque< std::pair< K, T >, A > &x)
 Decode to std::deque<std::pair<K, T> from an amqp::MAP.
 
encoderoperator<< (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 >
encoderoperator<< (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 >
encoderoperator<< (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 >
encoderoperator<< (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 >
encoderoperator<< (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. More...
 
template<class T , class A >
decoderoperator>> (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 >
decoderoperator>> (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 >
encoderoperator<< (encoder &e, const std::list< T, A > &x)
 std::list<T> for most T is encoded as an AMQP array.
 
template<class A >
encoderoperator<< (encoder &e, const std::list< value, A > &x)
 Specialize for std::list<value>, encode as AMQP list (variable type)
 
template<class A >
encoderoperator<< (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 >
encoderoperator<< (encoder &e, const std::list< std::pair< K, T >, A > &x)
 Specialize for std::list<std::pair<k,t> >, encode as AMQP map. More...
 
template<class T , class A >
decoderoperator>> (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 >
decoderoperator>> (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 >
encoderoperator<< (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 >
decoderoperator>> (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 >
encoderoperator<< (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 >
decoderoperator>> (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 >
encoderoperator<< (encoder &e, const std::vector< T, A > &x)
 Encode std::vector<T> as amqp::ARRAY (same type elements)
 
template<class A >
encoderoperator<< (encoder &e, const std::vector< value, A > &x)
 Encode std::vector<value> encode as amqp::LIST (mixed type elements)
 
template<class A >
encoderoperator<< (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 >
encoderoperator<< (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 >
decoderoperator>> (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 >
decoderoperator>> (decoder &d, std::vector< std::pair< K, T >, A > &x)
 Decode to std::vector<std::pair<K, T> from an amqp::MAP.
 

Detailed Description

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


Class Documentation

struct proton::codec::start

Experimental - Start encoding a complex type.

struct proton::codec::finish

Experimental - Finish inserting or extracting a complex type.

Function Documentation

encoder& proton::codec::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.

encoder& proton::codec::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.

encoder& proton::codec::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.

internal::enable_if<internal::is_unknown_integer<T>::value, decoder&>::type proton::codec::operator>> ( decoder &  d,
T &  i 
)

operator>> for integer types that are not covered by the standard overrides.