QMultiMap< Key, T > Class Template Reference

QMultiMap< Key, T > Class Template Reference

#include <qcontainerfwd.h>

Class Description

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

Definition at line 59 of file qcontainerfwd.h.

+ Inheritance diagram for QMultiMap< Key, T >:

Public Member Functions

 QMultiMap ()
 
 QMultiMap (const QMap< Key, T > &other)
 
void swap (QMultiMap< Key, T > &other)
 
QMap< Key, T >::iterator replace (const Key &key, const T &value)
 
QMap< Key, T >::iterator insert (const Key &key, const T &value)
 
QMultiMapoperator+= (const QMultiMap &other)
 
QMultiMap operator+ (const QMultiMap &other) const
 
bool contains (const Key &key, const T &value) const
 
int remove (const Key &key, const T &value)
 
int count (const Key &key, const T &value) const
 
QMap< Key, T >::iterator find (const Key &key, const T &value)
 
QMap< Key, T >::const_iterator find (const Key &key, const T &value) const
 
QMap< Key, T >::const_iterator constFind (const Key &key, const T &value) const
 
- Public Member Functions inherited from QMap< Key, T >
 QMap ()
 
 QMap (const QMap< Key, T > &other)
 
 ~QMap ()
 
QMap< Key, T > & operator= (const QMap< Key, T > &other)
 
void swap (QMap< Key, T > &other)
 
 QMap (const typename std::map< Key, T > &other)
 
std::map< Key, T > toStdMap () const
 
bool operator== (const QMap< Key, T > &other) const
 
bool operator!= (const QMap< Key, T > &other) const
 
int size () const
 
bool isEmpty () const
 
void detach ()
 
bool isDetached () const
 
void setSharable (bool sharable)
 
bool isSharedWith (const QMap< Key, T > &other) const
 
void setInsertInOrder (bool ordered)
 
void clear ()
 
int remove (const Key &key)
 
take (const Key &key)
 
bool contains (const Key &key) const
 
const Key key (const T &value) const
 
const Key key (const T &value, const Key &defaultKey) const
 
const T value (const Key &key) const
 
const T value (const Key &key, const T &defaultValue) const
 
T & operator[] (const Key &key)
 
const T operator[] (const Key &key) const
 
QList< Key > uniqueKeys () const
 
QList< Key > keys () const
 
QList< Key > keys (const T &value) const
 
QList< T > values () const
 
QList< T > values (const Key &key) const
 
int count (const Key &key) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator constBegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator constEnd () const
 
iterator erase (iterator it)
 
int count () const
 
iterator find (const Key &key)
 
const_iterator find (const Key &key) const
 
const_iterator constFind (const Key &key) const
 
iterator lowerBound (const Key &key)
 
const_iterator lowerBound (const Key &key) const
 
iterator upperBound (const Key &key)
 
const_iterator upperBound (const Key &key) const
 
iterator insert (const Key &key, const T &value)
 
iterator insertMulti (const Key &key, const T &value)
 
QMap< Key, T > & unite (const QMap< Key, T > &other)
 
bool empty () const
 

Additional Inherited Members

- Public Types inherited from QMap< Key, T >
typedef iterator Iterator
 
typedef const_iterator ConstIterator
 
typedef Key key_type
 
typedef T mapped_type
 
typedef qptrdiff difference_type
 
typedef int size_type
 

Constructor & Destructor Documentation

QMultiMap ( )
inline

Definition at line 976 of file qmap.h.

976 {}
QMultiMap ( const QMap< Key, T > &  other)
inline

Definition at line 977 of file qmap.h.

977 : QMap<Key, T>(other) {}

Member Function Documentation

void swap ( QMultiMap< Key, T > &  other)
inline

Definition at line 978 of file qmap.h.

978 { QMap<Key, T>::swap(other); }
void swap(QMap< Key, T > &other)
Definition: qmap.h:192
QMap<Key, T>::iterator replace ( const Key &  key,
const T &  value 
)
inline

Definition at line 980 of file qmap.h.

981  { return QMap<Key, T>::insert(key, value); }
iterator insert(const Key &key, const T &value)
Definition: qmap.h:559
const Key key(const T &value) const
Definition: qmap.h:844
GLsizei const GLfloat * value
Definition: GLee.h:1742
QMap<Key, T>::iterator insert ( const Key &  key,
const T &  value 
)
inline

Definition at line 982 of file qmap.h.

983  { return QMap<Key, T>::insertMulti(key, value); }
iterator insertMulti(const Key &key, const T &value)
Definition: qmap.h:595
const Key key(const T &value) const
Definition: qmap.h:844
GLsizei const GLfloat * value
Definition: GLee.h:1742
QMultiMap& operator+= ( const QMultiMap< Key, T > &  other)
inline

Definition at line 985 of file qmap.h.

986  { this->unite(other); return *this; }
QMap< Key, T > & unite(const QMap< Key, T > &other)
Definition: qmap.h:625
QMultiMap operator+ ( const QMultiMap< Key, T > &  other) const
inline

Definition at line 987 of file qmap.h.

988  { QMultiMap result = *this; result += other; return result; }
Q_INLINE_TEMPLATE bool contains ( const Key &  key,
const T &  value 
) const

Definition at line 1048 of file qmap.h.

1049 {
1050  return constFind(key, value) != QMap<Key, T>::constEnd();
1051 }
const_iterator constEnd() const
Definition: qmap.h:380
QMap< Key, T >::const_iterator constFind(const Key &key, const T &value) const
Definition: qmap.h:1040
const Key key(const T &value) const
Definition: qmap.h:844
GLsizei const GLfloat * value
Definition: GLee.h:1742
Q_INLINE_TEMPLATE int remove ( const Key &  key,
const T &  value 
)

Definition at line 1054 of file qmap.h.

1055 {
1056  int n = 0;
1057  typename QMap<Key, T>::iterator i(find(key));
1059  while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
1060  if (i.value() == value) {
1061  i = this->erase(i);
1062  ++n;
1063  } else {
1064  ++i;
1065  }
1066  }
1067  return n;
1068 }
iterator end()
Definition: qmap.h:375
iterator erase(iterator it)
Definition: qmap.h:717
const T value(const Key &key) const
Definition: qmap.h:499
const Key key(const T &value) const
Definition: qmap.h:844
GLenum GLsizei n
Definition: GLee.h:3432
QMap< Key, T >::iterator find(const Key &key, const T &value)
Definition: qmap.h:1020
GLuint GLuint end
Definition: GLee.h:872
Q_INLINE_TEMPLATE int count ( const Key &  key,
const T &  value 
) const

Definition at line 1071 of file qmap.h.

1072 {
1073  int n = 0;
1076  while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
1077  if (i.value() == value)
1078  ++n;
1079  ++i;
1080  }
1081  return n;
1082 }
iterator end()
Definition: qmap.h:375
QMap< Key, T >::const_iterator constFind(const Key &key, const T &value) const
Definition: qmap.h:1040
const T value(const Key &key) const
Definition: qmap.h:499
const Key key(const T &value) const
Definition: qmap.h:844
GLenum GLsizei n
Definition: GLee.h:3432
GLuint GLuint end
Definition: GLee.h:872
QMap<Key, T>::iterator find ( const Key &  key,
const T &  value 
)
inline

Definition at line 1020 of file qmap.h.

1020  {
1021  typename QMap<Key, T>::iterator i(find(key));
1022  typename QMap<Key, T>::iterator end(this->end());
1023  while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
1024  if (i.value() == value)
1025  return i;
1026  ++i;
1027  }
1028  return end;
1029  }
iterator end()
Definition: qmap.h:375
const T value(const Key &key) const
Definition: qmap.h:499
const Key key(const T &value) const
Definition: qmap.h:844
QMap< Key, T >::iterator find(const Key &key, const T &value)
Definition: qmap.h:1020
GLuint GLuint end
Definition: GLee.h:872
QMap<Key, T>::const_iterator find ( const Key &  key,
const T &  value 
) const
inline

Definition at line 1030 of file qmap.h.

1030  {
1033  while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
1034  if (i.value() == value)
1035  return i;
1036  ++i;
1037  }
1038  return end;
1039  }
iterator end()
Definition: qmap.h:375
QMap< Key, T >::const_iterator constFind(const Key &key, const T &value) const
Definition: qmap.h:1040
const T value(const Key &key) const
Definition: qmap.h:499
const Key key(const T &value) const
Definition: qmap.h:844
GLuint GLuint end
Definition: GLee.h:872
QMap<Key, T>::const_iterator constFind ( const Key &  key,
const T &  value 
) const
inline

Definition at line 1040 of file qmap.h.

1041  { return find(key, value); }
const Key key(const T &value) const
Definition: qmap.h:844
QMap< Key, T >::iterator find(const Key &key, const T &value)
Definition: qmap.h:1020
GLsizei const GLfloat * value
Definition: GLee.h:1742

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