C++ Web Framework  3.0
Public Types | Public Member Functions | List of all members
QMapThreadSafety< Key, T > Class Template Reference

The QMapThreadSafety class is a thread safe QMap. More...

#include <qmapthreadsafety.h>

Public Types

typedef QMap< Key, T >::iterator iterator
 
typedef QMap< Key, T >::const_iterator const_iterator
 

Public Member Functions

 QMapThreadSafety (std::initializer_list< std::pair< Key, T >> &list)
 
 QMapThreadSafety (const QMap< Key, T > &other)
 
 QMapThreadSafety (const std::map< Key, T > &other)
 
 QMapThreadSafety (QMap< Key, T > &&other)
 
iterator begin () const
 This method retuns the begin iterator. More...
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator constBegin () const
 
const_iterator constEnd () const
 
const_iterator constFind (const Key &key) const
 
bool contains (const Key &key) const
 This method checks if the map contains and specific element given a specific key. More...
 
int count (const Key &key) const
 
int count () const
 
bool empty () const
 
iterator end ()
 This method retuns the end iterator. More...
 
QPair< iterator, iterator > equal_range (const Key &key)
 
iterator erase (iterator pos)
 
iterator find (const Key &key)
 
const_iterator find (const Key &key) const
 
T & first ()
 
const T & first () const
 
const Key & firstKey () const
 
iterator insert (const Key &key, const T &value)
 This method inserts a new key and value in the map. More...
 
iterator insert (const_iterator pos, const Key &key, const T &value)
 
iterator insertMulti (const Key &key, const T &value)
 
bool isEmpty () const
 
QList< Key > keys () const
 
QList< Key > keys (const T &value) const
 
T & last ()
 
const T & last () const
 
iterator lowerBound (const Key &key)
 
const_iterator lowerBound (const Key &key) const
 
int remove (const Key &key)
 This method removes a specific element given a specific key. More...
 
int size () const
 
void swap (QMap< Key, T > &other)
 
take (const Key &key)
 
std::map< Key, T > toStdMap () const
 
QList< Key > uniqueKeys () const
 
QMap< Key, T > & unite (const QMap< Key, T > &other)
 
iterator upperBound (const Key &key)
 
const_iterator upperBound (const Key &key) const
 
const T value (const Key &key, const T &defaultValue=T()) const
 
QList< T > values () const
 
QList< T > values (const Key &key) const
 
bool operator!= (const QMap< Key, T > &other) const
 
QMap< Key, T > & operator= (const QMap< Key, T > &other)
 
QMap< Key, T > & operator= (QMap< Key, T > &&other)
 
bool operator== (const QMap< Key, T > &other) const
 
T & operator[] (const Key &key)
 
const T operator[] (const Key &key) const
 This method is an overload of the operator [] and returns a value given a specific key. More...
 

Detailed Description

template<typename Key, typename T>
class QMapThreadSafety< Key, T >

The QMapThreadSafety class is a thread safe QMap.

Member Function Documentation

◆ begin()

template<typename Key, typename T>
iterator QMapThreadSafety< Key, T >::begin ( ) const
inline

This method retuns the begin iterator.

Returns
iterator

◆ contains()

template<typename Key, typename T>
bool QMapThreadSafety< Key, T >::contains ( const Key &  key) const
inline

This method checks if the map contains and specific element given a specific key.

Parameters
key: This represents the key that you want to find.
Returns
returns true if find the key and false if not find.

◆ end()

template<typename Key, typename T>
iterator QMapThreadSafety< Key, T >::end ( )
inline

This method retuns the end iterator.

Returns
iterator

◆ insert()

template<typename Key, typename T>
iterator QMapThreadSafety< Key, T >::insert ( const Key &  key,
const T &  value 
)
inline

This method inserts a new key and value in the map.

Parameters
key: This represents the key that will be insert.
value: This represents the value that will be insert.

◆ operator[]()

template<typename Key, typename T>
const T QMapThreadSafety< Key, T >::operator[] ( const Key &  key) const
inline

This method is an overload of the operator [] and returns a value given a specific key.

Parameters
key: This represents the key that you want to find.
Returns
T

◆ remove()

template<typename Key, typename T>
int QMapThreadSafety< Key, T >::remove ( const Key &  key)
inline

This method removes a specific element given a specific key.

Parameters
key: This represents the key that will be insert.
Returns
int

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