Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QMapData< AMap > Class Template Reference

#include <qmap.h>

+ Inheritance diagram for QMapData< AMap >:
+ Collaboration diagram for QMapData< AMap >:

Classes

struct  EraseResult
 

Public Types

using Map = AMap
 
using Key = typename Map::key_type
 
using T = typename Map::mapped_type
 
using value_type = typename Map::value_type
 
using size_type = typename Map::size_type
 
using iterator = typename Map::iterator
 
using const_iterator = typename Map::const_iterator
 

Public Member Functions

 QMapData ()=default
 
 QMapData (const Map &other)
 
 QMapData (Map &&other)
 
size_type copyIfNotEquivalentTo (const Map &source, const Key &key)
 
Key key (const T &value, const Key &defaultKey) const
 
QList< Keykeys () const
 
QList< Keykeys (const T &value) const
 
QList< Tvalues () const
 
size_type count (const Key &key) const
 
EraseResult erase (const_iterator first, const_iterator last) const
 
- Public Member Functions inherited from QSharedData
 QSharedData () noexcept
 Constructs a QSharedData object with a reference count of 0.
 
 QSharedData (const QSharedData &) noexcept
 Constructs a QSharedData object with reference count 0.
 
QSharedDataoperator= (const QSharedData &)=delete
 
 ~QSharedData ()=default
 

Static Public Member Functions

static auto valueIsEqualTo (const T &value)
 

Public Attributes

Map m
 
- Public Attributes inherited from QSharedData
QAtomicInt ref
 

Detailed Description

template<typename AMap>
class QMapData< AMap >

Definition at line 24 of file qmap.h.

Member Typedef Documentation

◆ const_iterator

template<typename AMap >
using QMapData< AMap >::const_iterator = typename Map::const_iterator

Definition at line 33 of file qmap.h.

◆ iterator

template<typename AMap >
using QMapData< AMap >::iterator = typename Map::iterator

Definition at line 32 of file qmap.h.

◆ Key

template<typename AMap >
using QMapData< AMap >::Key = typename Map::key_type

Definition at line 28 of file qmap.h.

◆ Map

template<typename AMap >
using QMapData< AMap >::Map = AMap

Definition at line 27 of file qmap.h.

◆ size_type

template<typename AMap >
using QMapData< AMap >::size_type = typename Map::size_type

Definition at line 31 of file qmap.h.

◆ T

template<typename AMap >
using QMapData< AMap >::T = typename Map::mapped_type

Definition at line 29 of file qmap.h.

◆ value_type

template<typename AMap >
using QMapData< AMap >::value_type = typename Map::value_type

Definition at line 30 of file qmap.h.

Constructor & Destructor Documentation

◆ QMapData() [1/3]

template<typename AMap >
QMapData< AMap >::QMapData ( )
default

Referenced by QMapData< AMap >::erase().

+ Here is the caller graph for this function:

◆ QMapData() [2/3]

template<typename AMap >
QMapData< AMap >::QMapData ( const Map other)
inlineexplicit

Definition at line 41 of file qmap.h.

◆ QMapData() [3/3]

template<typename AMap >
QMapData< AMap >::QMapData ( Map &&  other)
inlineexplicit

Definition at line 45 of file qmap.h.

Member Function Documentation

◆ copyIfNotEquivalentTo()

template<typename AMap >
size_type QMapData< AMap >::copyIfNotEquivalentTo ( const Map source,
const Key key 
)
inline

Definition at line 51 of file qmap.h.

References Q_ASSERT.

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

+ Here is the caller graph for this function:

◆ count()

template<typename AMap >
size_type QMapData< AMap >::count ( const Key key) const
inline

Definition at line 133 of file qmap.h.

◆ erase()

template<typename AMap >
EraseResult QMapData< AMap >::erase ( const_iterator  first,
const_iterator  last 
) const
inline

Definition at line 147 of file qmap.h.

References QMapData< AMap >::QMapData(), e, and i.

+ Here is the call graph for this function:

◆ key()

template<typename AMap >
Key QMapData< AMap >::key ( const T value,
const Key defaultKey 
) const
inline

Definition at line 81 of file qmap.h.

References i, and QMapData< AMap >::valueIsEqualTo().

+ Here is the call graph for this function:

◆ keys() [1/2]

template<typename AMap >
QList< Key > QMapData< AMap >::keys ( ) const
inline

Definition at line 92 of file qmap.h.

◆ keys() [2/2]

template<typename AMap >
QList< Key > QMapData< AMap >::keys ( const T value) const
inline

Definition at line 106 of file qmap.h.

References QMapData< AMap >::m.

◆ valueIsEqualTo()

template<typename AMap >
static auto QMapData< AMap >::valueIsEqualTo ( const T value)
inlinestatic

Definition at line 76 of file qmap.h.

Referenced by QMultiMap< Key, T >::count(), QMultiMap< Key, T >::find(), QMultiMap< Key, T >::find(), and QMapData< AMap >::key().

+ Here is the caller graph for this function:

◆ values()

template<typename AMap >
QList< T > QMapData< AMap >::values ( ) const
inline

Definition at line 119 of file qmap.h.

Member Data Documentation

◆ m

template<typename AMap >
Map QMapData< AMap >::m

Definition at line 38 of file qmap.h.

Referenced by QMapData< AMap >::keys().


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