map< K, T > Class Template Reference

A collection of key-value pairs. More...

#include <map.hpp>

List of all members.

Public Member Functions

 map ()
 Construct an empty map.
 map (const map &)
 Copy a map.
mapoperator= (const map &)
 Copy a map.
 map (map &&)
 Move a map.
mapoperator= (map &&)
 Move a map.
template<class M >
assignable_map< M, map & >::type operator= (const M &x)
 Type-safe assign from a compatible map, for instance `stdmap<K,T>`.
void value (const value &x)
 Copy from a proton::value.
proton::valuevalue ()
 Access as a proton::value containing an AMQP map.
const proton::valuevalue () const
 Access as a proton::value containing an AMQP map.
get (const K &k) const
 Get the map entry for key `k`.
void put (const K &k, const T &v)
 Put a map entry for key `k`.
size_t erase (const K &k)
 Erase the map entry at `k`.
bool exists (const K &k) const
 True if the map has an entry for `k`.
size_t size () const
 Get the number of map entries.
void clear ()
 Remove all map entries.
bool empty () const
 True if the map has no entries.

Detailed Description

template<class K, class T>
class proton::map< K, T >

A collection of key-value pairs.

Used to access standard AMQP property, annotation, and filter maps attached to proton::message and proton::source.

This class provides only basic get() and put() operations for convenience. For more complicated uses (iteration, preserving order, and so on), convert the value to a standard C++ map type such as `stdmap`. See message_properties::cpp and types_page.


Member Function Documentation

assignable_map<M, map&>::type operator= ( const M &  x  )  [inline]

Type-safe assign from a compatible map, for instance `stdmap<K,T>`.

See types_page.

void value ( const value x  ) 

Copy from a proton::value.

Exceptions:
proton::conversion_error if `x` does not contain a compatible map.
T get ( const K &  k  )  const

Get the map entry for key `k`.

Return `T()` if there is no such entry.


The documentation for this class was generated from the following file:

Generated on 28 Nov 2017 for Qpid Proton C++ by  doxygen 1.6.1