QMap< Key, T > Class Template Reference

QMap< Key, T > Class Template Reference

#include <audiodataoutput.h>

Class Description

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

Definition at line 34 of file audiodataoutput.h.

+ Inheritance diagram for QMap< Key, T >:

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef iterator Iterator
 
typedef const_iterator ConstIterator
 
typedef Key key_type
 
typedef T mapped_type
 
typedef qptrdiff difference_type
 
typedef int size_type
 

Public Member Functions

 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
 

Friends

class iterator
 
class const_iterator
 

Member Typedef Documentation

typedef iterator Iterator

Definition at line 388 of file qmap.h.

Definition at line 389 of file qmap.h.

typedef Key key_type

Definition at line 409 of file qmap.h.

typedef T mapped_type

Definition at line 410 of file qmap.h.

typedef qptrdiff difference_type

Definition at line 411 of file qmap.h.

typedef int size_type

Definition at line 412 of file qmap.h.

Constructor & Destructor Documentation

QMap ( )
inline

Definition at line 182 of file qmap.h.

182 : d(&QMapData::shared_null) { d->ref.ref(); }
QBasicAtomicInt ref
Definition: qmap.h:71
QMapData * d
Definition: qmap.h:165
static QMapData shared_null
Definition: qmap.h:91
QMap ( const QMap< Key, T > &  other)
inline

Definition at line 183 of file qmap.h.

183  : d(other.d)
184  { d->ref.ref(); if (!d->sharable) detach(); }
uint sharable
Definition: qmap.h:76
void detach()
Definition: qmap.h:205
QBasicAtomicInt ref
Definition: qmap.h:71
QMapData * d
Definition: qmap.h:165
~QMap ( )
inline

Definition at line 185 of file qmap.h.

185 { if (!d) return; if (!d->ref.deref()) freeData(d); }
QBasicAtomicInt ref
Definition: qmap.h:71
QMapData * d
Definition: qmap.h:165
QMap ( const typename std::map< Key, T > &  other)
explicit

Member Function Documentation

Q_INLINE_TEMPLATE QMap< Key, T > & operator= ( const QMap< Key, T > &  other)

Definition at line 429 of file qmap.h.

430 {
431  if (d != other.d) {
432  QMapData* o = other.d;
433  o->ref.ref();
434  if (!d->ref.deref())
435  freeData(d);
436  d = o;
437  if (!d->sharable)
438  detach_helper();
439  }
440  return *this;
441 }
uint sharable
Definition: qmap.h:76
QBasicAtomicInt ref
Definition: qmap.h:71
QMapData * d
Definition: qmap.h:165
Definition: qmap.h:61
void swap ( QMap< Key, T > &  other)
inline

Definition at line 192 of file qmap.h.

192 { qSwap(d, other.d); }
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
QMapData * d
Definition: qmap.h:165
Q_OUTOFLINE_TEMPLATE std::map< Key, T > toStdMap ( ) const

Definition at line 959 of file qmap.h.

960 {
961  std::map<Key, T> map;
962  const_iterator it = end();
963  while (it != begin()) {
964  --it;
965  map.insert(std::pair<Key, T>(it.key(), it.value()));
966  }
967  return map;
968 }
iterator end()
Definition: qmap.h:375
friend class const_iterator
Definition: qmap.h:369
QFuture< void > map(Sequence &sequence, MapFunctor map)
iterator begin()
Definition: qmap.h:372
Q_OUTOFLINE_TEMPLATE bool operator== ( const QMap< Key, T > &  other) const

Definition at line 925 of file qmap.h.

926 {
927  if (size() != other.size())
928  return false;
929  if (d == other.d)
930  return true;
931 
932  const_iterator it1 = begin();
933  const_iterator it2 = other.begin();
934 
935  while (it1 != end()) {
936  if (!(it1.value() == it2.value()) || qMapLessThanKey(it1.key(), it2.key()) || qMapLessThanKey(it2.key(), it1.key()))
937  return false;
938  ++it2;
939  ++it1;
940  }
941  return true;
942 }
iterator end()
Definition: qmap.h:375
friend class const_iterator
Definition: qmap.h:369
iterator begin()
Definition: qmap.h:372
QMapData * d
Definition: qmap.h:165
bool qMapLessThanKey(const Key &key1, const Key &key2)
Definition: qmap.h:105
int size() const
Definition: qmap.h:201
bool operator!= ( const QMap< Key, T > &  other) const
inline

Definition at line 199 of file qmap.h.

199 { return !(*this == other); }
int size ( ) const
inline

Definition at line 201 of file qmap.h.

201 { return d->size; }
int size
Definition: qmap.h:73
QMapData * d
Definition: qmap.h:165
bool isEmpty ( ) const
inline

Definition at line 203 of file qmap.h.

203 { return d->size == 0; }
int size
Definition: qmap.h:73
QMapData * d
Definition: qmap.h:165
void detach ( )
inline

Definition at line 205 of file qmap.h.

205 { if (d->ref != 1) detach_helper(); }
QBasicAtomicInt ref
Definition: qmap.h:71
QMapData * d
Definition: qmap.h:165
bool isDetached ( ) const
inline

Definition at line 206 of file qmap.h.

206 { return d->ref == 1; }
QBasicAtomicInt ref
Definition: qmap.h:71
QMapData * d
Definition: qmap.h:165
void setSharable ( bool  sharable)
inline

Definition at line 207 of file qmap.h.

207 { if (!sharable) detach(); d->sharable = sharable; }
uint sharable
Definition: qmap.h:76
void detach()
Definition: qmap.h:205
QMapData * d
Definition: qmap.h:165
bool isSharedWith ( const QMap< Key, T > &  other) const
inline

Definition at line 208 of file qmap.h.

208 { return d == other.d; }
QMapData * d
Definition: qmap.h:165
void setInsertInOrder ( bool  ordered)
inline

Definition at line 209 of file qmap.h.

209 { d->insertInOrder = ordered; }
uint insertInOrder
Definition: qmap.h:75
QMapData * d
Definition: qmap.h:165
Q_INLINE_TEMPLATE void clear ( )

Definition at line 444 of file qmap.h.

445 {
446  *this = QMap<Key, T>();
447 }
Q_OUTOFLINE_TEMPLATE int remove ( const Key &  key)

Definition at line 662 of file qmap.h.

663 {
664  detach();
665 
666  QMapData::Node *update[QMapData::LastLevel + 1];
667  QMapData::Node *cur = e;
668  QMapData::Node *next = e;
669  int oldSize = d->size;
670 
671  for (int i = d->topLevel; i >= 0; i--) {
672  while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
673  cur = next;
674  update[i] = cur;
675  }
676 
677  if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
678  bool deleteNext = true;
679  do {
680  cur = next;
681  next = cur->forward[0];
682  deleteNext = (next != e && !qMapLessThanKey<Key>(concrete(cur)->key, concrete(next)->key));
683  concrete(cur)->key.~Key();
684  concrete(cur)->value.~T();
685  d->node_delete(update, payload(), cur);
686  } while (deleteNext);
687  }
688  return oldSize - d->size;
689 }
int size
Definition: qmap.h:73
void detach()
Definition: qmap.h:205
Key key
Definition: qmap.h:124
int topLevel
Definition: qmap.h:72
const Key key(const T &value) const
Definition: qmap.h:844
QMapData * d
Definition: qmap.h:165
T value
Definition: qmap.h:125
void node_delete(Node *update[], int offset, Node *node)
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
Q_OUTOFLINE_TEMPLATE T take ( const Key &  key)

Definition at line 692 of file qmap.h.

693 {
694  detach();
695 
696  QMapData::Node *update[QMapData::LastLevel + 1];
697  QMapData::Node *cur = e;
698  QMapData::Node *next = e;
699 
700  for (int i = d->topLevel; i >= 0; i--) {
701  while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
702  cur = next;
703  update[i] = cur;
704  }
705 
706  if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
707  T t = concrete(next)->value;
708  concrete(next)->key.~Key();
709  concrete(next)->value.~T();
710  d->node_delete(update, payload(), next);
711  return t;
712  }
713  return T();
714 }
void detach()
Definition: qmap.h:205
Key key
Definition: qmap.h:124
int topLevel
Definition: qmap.h:72
const Key key(const T &value) const
Definition: qmap.h:844
QMapData * d
Definition: qmap.h:165
T value
Definition: qmap.h:125
void node_delete(Node *update[], int offset, Node *node)
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
GLdouble GLdouble t
Definition: GLee.h:1181
Q_INLINE_TEMPLATE bool contains ( const Key &  key) const

Definition at line 553 of file qmap.h.

554 {
555  return findNode(akey) != e;
556 }
QMapData::Node * e
Definition: qmap.h:166
Q_OUTOFLINE_TEMPLATE const Key key ( const T &  value) const

Definition at line 844 of file qmap.h.

845 {
846  return key(avalue, Key());
847 }
const Key key(const T &value) const
Definition: qmap.h:844
Q_OUTOFLINE_TEMPLATE const Key key ( const T &  value,
const Key &  defaultKey 
) const

Definition at line 850 of file qmap.h.

851 {
852  const_iterator i = begin();
853  while (i != end()) {
854  if (i.value() == avalue)
855  return i.key();
856  ++i;
857  }
858 
859  return defaultKey;
860 }
iterator end()
Definition: qmap.h:375
friend class const_iterator
Definition: qmap.h:369
iterator begin()
Definition: qmap.h:372
Q_INLINE_TEMPLATE const T value ( const Key &  key) const

Definition at line 499 of file qmap.h.

500 {
501  QMapData::Node *node;
502  if (d->size == 0 || (node = findNode(akey)) == e) {
503  return T();
504  } else {
505  return concrete(node)->value;
506  }
507 }
int size
Definition: qmap.h:73
QMapData * d
Definition: qmap.h:165
T value
Definition: qmap.h:125
QMapData::Node * e
Definition: qmap.h:166
Q_INLINE_TEMPLATE const T value ( const Key &  key,
const T &  defaultValue 
) const

Definition at line 510 of file qmap.h.

511 {
512  QMapData::Node *node;
513  if (d->size == 0 || (node = findNode(akey)) == e) {
514  return adefaultValue;
515  } else {
516  return concrete(node)->value;
517  }
518 }
int size
Definition: qmap.h:73
QMapData * d
Definition: qmap.h:165
T value
Definition: qmap.h:125
QMapData::Node * e
Definition: qmap.h:166
Q_INLINE_TEMPLATE T & operator[] ( const Key &  key)

Definition at line 527 of file qmap.h.

528 {
529  detach();
530 
531  QMapData::Node *update[QMapData::LastLevel + 1];
532  QMapData::Node *node = mutableFindNode(update, akey);
533  if (node == e)
534  node = node_create(d, update, akey, T());
535  return concrete(node)->value;
536 }
void detach()
Definition: qmap.h:205
QMapData * d
Definition: qmap.h:165
T value
Definition: qmap.h:125
QMapData::Node * e
Definition: qmap.h:166
Q_INLINE_TEMPLATE const T operator[] ( const Key &  key) const

Definition at line 521 of file qmap.h.

522 {
523  return value(akey);
524 }
const T value(const Key &key) const
Definition: qmap.h:499
Q_OUTOFLINE_TEMPLATE QList< Key > uniqueKeys ( ) const

Definition at line 798 of file qmap.h.

799 {
800  QList<Key> res;
801  res.reserve(size()); // May be too much, but assume short lifetime
802  const_iterator i = begin();
803  if (i != end()) {
804  for (;;) {
805  const Key &aKey = i.key();
806  res.append(aKey);
807  do {
808  if (++i == end())
809  goto break_out_of_outer_loop;
810  } while (!(aKey < i.key())); // loop while (key == i.key())
811  }
812  }
813 break_out_of_outer_loop:
814  return res;
815 }
iterator end()
Definition: qmap.h:375
friend class const_iterator
Definition: qmap.h:369
GLuint res
Definition: GLee.h:7185
void reserve(int size)
Definition: qlist.h:496
iterator begin()
Definition: qmap.h:372
void append(const T &t)
Definition: qlist.h:507
int size() const
Definition: qmap.h:201
Q_OUTOFLINE_TEMPLATE QList< Key > keys ( ) const

Definition at line 818 of file qmap.h.

819 {
820  QList<Key> res;
821  res.reserve(size());
822  const_iterator i = begin();
823  while (i != end()) {
824  res.append(i.key());
825  ++i;
826  }
827  return res;
828 }
iterator end()
Definition: qmap.h:375
friend class const_iterator
Definition: qmap.h:369
GLuint res
Definition: GLee.h:7185
void reserve(int size)
Definition: qlist.h:496
iterator begin()
Definition: qmap.h:372
void append(const T &t)
Definition: qlist.h:507
int size() const
Definition: qmap.h:201
Q_OUTOFLINE_TEMPLATE QList< Key > keys ( const T &  value) const

Definition at line 831 of file qmap.h.

832 {
833  QList<Key> res;
834  const_iterator i = begin();
835  while (i != end()) {
836  if (i.value() == avalue)
837  res.append(i.key());
838  ++i;
839  }
840  return res;
841 }
iterator end()
Definition: qmap.h:375
friend class const_iterator
Definition: qmap.h:369
GLuint res
Definition: GLee.h:7185
iterator begin()
Definition: qmap.h:372
void append(const T &t)
Definition: qlist.h:507
Q_OUTOFLINE_TEMPLATE QList< T > values ( ) const

Definition at line 863 of file qmap.h.

864 {
865  QList<T> res;
866  res.reserve(size());
867  const_iterator i = begin();
868  while (i != end()) {
869  res.append(i.value());
870  ++i;
871  }
872  return res;
873 }
iterator end()
Definition: qmap.h:375
friend class const_iterator
Definition: qmap.h:369
GLuint res
Definition: GLee.h:7185
void reserve(int size)
Definition: qlist.h:496
iterator begin()
Definition: qmap.h:372
void append(const T &t)
Definition: qlist.h:507
int size() const
Definition: qmap.h:201
Q_OUTOFLINE_TEMPLATE QList< T > values ( const Key &  key) const

Definition at line 876 of file qmap.h.

877 {
878  QList<T> res;
879  QMapData::Node *node = findNode(akey);
880  if (node != e) {
881  do {
882  res.append(concrete(node)->value);
883  node = node->forward[0];
884  } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
885  }
886  return res;
887 }
GLuint res
Definition: GLee.h:7185
const Key key(const T &value) const
Definition: qmap.h:844
GLsizei const GLfloat * value
Definition: GLee.h:1742
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
void append(const T &t)
Definition: qlist.h:507
Q_INLINE_TEMPLATE int count ( const Key &  key) const

Definition at line 539 of file qmap.h.

540 {
541  int cnt = 0;
542  QMapData::Node *node = findNode(akey);
543  if (node != e) {
544  do {
545  ++cnt;
546  node = node->forward[0];
547  } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
548  }
549  return cnt;
550 }
const Key key(const T &value) const
Definition: qmap.h:844
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
iterator begin ( )
inline

Definition at line 372 of file qmap.h.

372 { detach(); return iterator(e->forward[0]); }
void detach()
Definition: qmap.h:205
friend class iterator
Definition: qmap.h:299
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
const_iterator begin ( ) const
inline

Definition at line 373 of file qmap.h.

373 { return const_iterator(e->forward[0]); }
friend class const_iterator
Definition: qmap.h:369
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
const_iterator constBegin ( ) const
inline

Definition at line 374 of file qmap.h.

374 { return const_iterator(e->forward[0]); }
friend class const_iterator
Definition: qmap.h:369
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
iterator end ( )
inline

Definition at line 375 of file qmap.h.

375  {
376  detach();
377  return iterator(e);
378  }
void detach()
Definition: qmap.h:205
friend class iterator
Definition: qmap.h:299
QMapData::Node * e
Definition: qmap.h:166
const_iterator end ( ) const
inline

Definition at line 379 of file qmap.h.

379 { return const_iterator(e); }
friend class const_iterator
Definition: qmap.h:369
QMapData::Node * e
Definition: qmap.h:166
const_iterator constEnd ( ) const
inline

Definition at line 380 of file qmap.h.

380 { return const_iterator(e); }
friend class const_iterator
Definition: qmap.h:369
QMapData::Node * e
Definition: qmap.h:166
Q_OUTOFLINE_TEMPLATE QMap< Key, T >::iterator erase ( iterator  it)

Definition at line 717 of file qmap.h.

718 {
719  QMapData::Node *update[QMapData::LastLevel + 1];
720  QMapData::Node *cur = e;
721  QMapData::Node *next = e;
722 
723  if (it == iterator(e))
724  return it;
725 
726  for (int i = d->topLevel; i >= 0; i--) {
727  while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, it.key()))
728  cur = next;
729  update[i] = cur;
730  }
731 
732  while (next != e) {
733  cur = next;
734  next = cur->forward[0];
735  if (cur == it) {
736  concrete(cur)->key.~Key();
737  concrete(cur)->value.~T();
738  d->node_delete(update, payload(), cur);
739  return iterator(next);
740  }
741 
742  for (int i = 0; i <= d->topLevel; ++i) {
743  if (update[i]->forward[i] != cur)
744  break;
745  update[i] = cur;
746  }
747  }
748  return end();
749 }
iterator end()
Definition: qmap.h:375
Key key
Definition: qmap.h:124
int topLevel
Definition: qmap.h:72
friend class iterator
Definition: qmap.h:299
const Key key(const T &value) const
Definition: qmap.h:844
QMapData * d
Definition: qmap.h:165
T value
Definition: qmap.h:125
void node_delete(Node *update[], int offset, Node *node)
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
int count ( ) const
inline

Definition at line 390 of file qmap.h.

390 { return d->size; }
int size
Definition: qmap.h:73
QMapData * d
Definition: qmap.h:165
Q_INLINE_TEMPLATE QMap< Key, T >::iterator find ( const Key &  key)

Definition at line 618 of file qmap.h.

619 {
620  detach();
621  return iterator(findNode(akey));
622 }
void detach()
Definition: qmap.h:205
friend class iterator
Definition: qmap.h:299
Q_INLINE_TEMPLATE QMap< Key, T >::const_iterator find ( const Key &  key) const

Definition at line 606 of file qmap.h.

607 {
608  return const_iterator(findNode(akey));
609 }
friend class const_iterator
Definition: qmap.h:369
Q_INLINE_TEMPLATE QMap< Key, T >::const_iterator constFind ( const Key &  key) const

Definition at line 612 of file qmap.h.

613 {
614  return const_iterator(findNode(akey));
615 }
friend class const_iterator
Definition: qmap.h:369
Q_INLINE_TEMPLATE QMap< Key, T >::iterator lowerBound ( const Key &  key)

Definition at line 899 of file qmap.h.

900 {
901  detach();
902  return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->lowerBound(akey));
903 }
void detach()
Definition: qmap.h:205
iterator lowerBound(const Key &key)
Definition: qmap.h:899
Q_INLINE_TEMPLATE QMap< Key, T >::const_iterator lowerBound ( const Key &  key) const

Definition at line 891 of file qmap.h.

892 {
893  QMapData::Node *update[QMapData::LastLevel + 1];
894  mutableFindNode(update, akey);
895  return const_iterator(update[0]->forward[0]);
896 }
friend class const_iterator
Definition: qmap.h:369
Q_INLINE_TEMPLATE QMap< Key, T >::iterator upperBound ( const Key &  key)

Definition at line 918 of file qmap.h.

919 {
920  detach();
921  return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->upperBound(akey));
922 }
void detach()
Definition: qmap.h:205
iterator upperBound(const Key &key)
Definition: qmap.h:918
Q_INLINE_TEMPLATE QMap< Key, T >::const_iterator upperBound ( const Key &  key) const

Definition at line 907 of file qmap.h.

908 {
909  QMapData::Node *update[QMapData::LastLevel + 1];
910  mutableFindNode(update, akey);
911  QMapData::Node *node = update[0]->forward[0];
912  while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key))
913  node = node->forward[0];
914  return const_iterator(node);
915 }
friend class const_iterator
Definition: qmap.h:369
const Key key(const T &value) const
Definition: qmap.h:844
QMapData::Node * e
Definition: qmap.h:166
Node * forward[1]
Definition: qmap.h:65
Q_INLINE_TEMPLATE QMap< Key, T >::iterator insert ( const Key &  key,
const T &  value 
)

Definition at line 559 of file qmap.h.

561 {
562  detach();
563 
564  QMapData::Node *update[QMapData::LastLevel + 1];
565  QMapData::Node *node = mutableFindNode(update, akey);
566  if (node == e) {
567  node = node_create(d, update, akey, avalue);
568  } else {
569  concrete(node)->value = avalue;
570  }
571  return iterator(node);
572 }
void detach()
Definition: qmap.h:205
friend class iterator
Definition: qmap.h:299
QMapData * d
Definition: qmap.h:165
T value
Definition: qmap.h:125
QMapData::Node * e
Definition: qmap.h:166
Q_INLINE_TEMPLATE QMap< Key, T >::iterator insertMulti ( const Key &  key,
const T &  value 
)

Definition at line 595 of file qmap.h.

597 {
598  detach();
599 
600  QMapData::Node *update[QMapData::LastLevel + 1];
601  mutableFindNode(update, akey);
602  return iterator(node_create(d, update, akey, avalue));
603 }
void detach()
Definition: qmap.h:205
friend class iterator
Definition: qmap.h:299
QMapData * d
Definition: qmap.h:165
Q_INLINE_TEMPLATE QMap< Key, T > & unite ( const QMap< Key, T > &  other)

Definition at line 625 of file qmap.h.

626 {
627  QMap<Key, T> copy(other);
628  const_iterator it = copy.constEnd();
629  const const_iterator b = copy.constBegin();
630  while (it != b) {
631  --it;
632  insertMulti(it.key(), it.value());
633  }
634  return *this;
635 }
friend class const_iterator
Definition: qmap.h:369
iterator insertMulti(const Key &key, const T &value)
Definition: qmap.h:595
GLubyte GLubyte b
Definition: GLee.h:5404
bool empty ( ) const
inline

Definition at line 413 of file qmap.h.

413 { return isEmpty(); }
bool isEmpty() const
Definition: qmap.h:203

Friends And Related Function Documentation

friend class iterator
friend

Definition at line 299 of file qmap.h.

friend class const_iterator
friend

Definition at line 369 of file qmap.h.

Member Data Documentation

Definition at line 165 of file qmap.h.

Definition at line 166 of file qmap.h.


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