Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QMap< Key, T > Class Template Reference

#include <qmap.h>

+ Collaboration diagram for QMap< Key, T >:

Public Types

using key_type = Key
 
using mapped_type = T
 
using difference_type = qptrdiff
 
using size_type = qsizetype
 

Public Member Functions

 QMap ()=default
 
void swap (QMap< Key, T > &other) noexcept
 
 QMap (std::initializer_list< std::pair< Key, T > > list)
 
 QMap (const std::map< Key, T > &other)
 
 QMap (std::map< Key, T > &&other)
 
std::map< Key, T > toStdMap () const &
 
std::map< Key, T > toStdMap () &&
 

Friends

class QMultiMap< Key, T >
 
template<typename AKey = Key, typename AT = T, QTypeTraits::compare_eq_result_container< QMap, AKey, AT > = true>
bool comparesEqual (const QMap &lhs, const QMap &rhs)
 
size_t qHash (const M &key, size_t seed=0) noexcept(QHashPrivate::noexceptPairHash< typename M::key_type, typename M::mapped_type >())
 

Detailed Description

template<class Key, class T>
class QMap< Key, T >

Definition at line 188 of file qmap.h.

Member Typedef Documentation

◆ difference_type

template<class Key , class T >
using QMap< Key, T >::difference_type = qptrdiff

Definition at line 199 of file qmap.h.

◆ key_type

template<class Key , class T >
using QMap< Key, T >::key_type = Key

Definition at line 197 of file qmap.h.

◆ mapped_type

template<class Key , class T >
using QMap< Key, T >::mapped_type = T

Definition at line 198 of file qmap.h.

◆ size_type

template<class Key , class T >
using QMap< Key, T >::size_type = qsizetype

Definition at line 200 of file qmap.h.

Constructor & Destructor Documentation

◆ QMap() [1/4]

template<class Key , class T >
QMap< Key, T >::QMap ( )
default

◆ QMap() [2/4]

template<class Key , class T >
QMap< Key, T >::QMap ( std::initializer_list< std::pair< Key, T > > list)
inline

Definition at line 211 of file qmap.h.

◆ QMap() [3/4]

template<class Key , class T >
QMap< Key, T >::QMap ( const std::map< Key, T > & other)
inlineexplicit

Definition at line 217 of file qmap.h.

References QMap< Key, T >::QMap().

Referenced by QMap< Key, T >::QMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QMap() [4/4]

template<class Key , class T >
QMap< Key, T >::QMap ( std::map< Key, T > && other)
inlineexplicit

Definition at line 222 of file qmap.h.

References QMap< Key, T >::QMap().

Referenced by QMap< Key, T >::QMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ swap()

template<class Key , class T >
void QMap< Key, T >::swap ( QMap< Key, T > & other)
inlinenoexcept

Definition at line 206 of file qmap.h.

◆ toStdMap() [1/2]

template<class Key , class T >
std::map< Key, T > QMap< Key, T >::toStdMap ( ) &&
inline

Definition at line 234 of file qmap.h.

◆ toStdMap() [2/2]

template<class Key , class T >
std::map< Key, T > QMap< Key, T >::toStdMap ( ) const &
inline

Definition at line 227 of file qmap.h.

Friends And Related Symbol Documentation

◆ comparesEqual

template<class Key , class T >
template<typename AKey = Key, typename AT = T, QTypeTraits::compare_eq_result_container< QMap, AKey, AT > = true>
bool comparesEqual ( const QMap< Key, T > & lhs,
const QMap< Key, T > & rhs )
friend

Definition at line 250 of file qmap.h.

◆ qHash

template<class Key , class T >
size_t qHash ( const M & key,
size_t seed = 0 )
friend

Definition at line 798 of file qmap.h.

◆ QMultiMap< Key, T >

template<class Key , class T >
friend class QMultiMap< Key, T >
friend

Definition at line 192 of file qmap.h.


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