azure-core-amqp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Azure::Core::Amqp::Models::AmqpMap Class Referencefinal

An AmqpMap represents an AMQP "map" type. More...

#include <amqp_value.hpp>

Inheritance diagram for Azure::Core::Amqp::Models::AmqpMap:

Public Member Functions

 AmqpMap ()
 Construct a new AmqpMap object.
 
 AmqpMap (std::initializer_list< std::map< AmqpValue, AmqpValue >::value_type > const &values)
 Construct a new AmqpArray object with an initializer list.
 
 AmqpMap (AmqpMap &&other) noexcept=default
 Move Constructor.
 
AmqpMapoperator= (AmqpMap &&other) noexcept=default
 Move assignment operator.
 
 AmqpMap (const AmqpMap &other)=default
 Copy Constructor.
 
AmqpMapoperator= (const AmqpMap &other)=default
 Copy assignment operator.
 
 AmqpMap (AmqpValue const &value)
 Construct a new AmqpMap object from an existing uAMQP AMQP_VALUE item.
 
decltype(m_value) ::mapped_type & operator[] (decltype(m_value)::key_type &&keyVal)
 Access an element in the map.
 
template<class... ValueTypes>
std::pair< decltype(m_value)::iterator, bool > emplace (ValueTypes &&... values)
 Insert a new key/value pair into the map.
 

Detailed Description

An AMQP Map is a polymorphic map of distinct keys to values.

Constructor & Destructor Documentation

◆ AmqpMap()

Azure::Core::Amqp::Models::AmqpMap::AmqpMap ( AmqpValue const &  value)
Remarks
Note that this does NOT capture the passed in AMQP_VALUE object, the caller is responsible for freeing that object.
This is an internal accessor and should never be used by code outside the AMQP implementation.
Parameters
value- the AMQP array value to capture.

Member Function Documentation

◆ emplace()

template<class... ValueTypes>
std::pair< decltype(m_value)::iterator, bool > Azure::Core::Amqp::Models::AmqpMap::emplace ( ValueTypes &&...  values)
inline
Returns
std::pair<iterator, bool> - a pair containing an iterator to the inserted element, or an iterator to the element that prevented the insertion, and a bool indicating whether the insertion took place.

◆ operator[]()

decltype(m_value) ::mapped_type & Azure::Core::Amqp::Models::AmqpMap::operator[] ( decltype(m_value)::key_type &&  keyVal)
inline
Returns
a reference to the value associated with the specified key.

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