A collection of key-value pairs. More...
#include <map.hpp>
Public Member Functions | |
map () | |
Construct an empty map. | |
map (const map &) | |
Copy a map. | |
map & | operator= (const map &) |
Copy a map. | |
map (const std::map< K, T > &) | |
Copy a std::map. | |
map & | operator= (const std::map< K, T > &) |
Copy a std::map. | |
map (const std::initializer_list< std::pair< const K, T >> &) | |
Initializer_list constructor. | |
map (map &&) | |
Move a map. | |
map & | operator= (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 std::map<K,T> . More... | |
void | value (const value &x) |
Copy from a proton::value. More... | |
proton::value & | value () |
Access as a proton::value containing an AMQP map. | |
const proton::value & | value () const |
Access as a proton::value containing an AMQP map. | |
T | get (const K &k) const |
Get the map entry for key k . More... | |
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. | |
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 std::map
. See message_properties.cpp and AMQP and C++ types.
|
inline |
Type-safe assign from a compatible map, for instance std::map<K,T>
.
See AMQP and C++ types.
Copy from a proton::value.
proton::conversion_error | if x does not contain a compatible map. |
T get | ( | const K & | k | ) | const |