#include <qset.h>
Classes |
|
| class | const_iterator |
| class | iterator |
Public Types |
|
| typedef iterator | Iterator |
| typedef const_iterator | ConstIterator |
| typedef T | key_type |
| typedef T | value_type |
| typedef value_type * | pointer |
| typedef const value_type * | const_pointer |
| typedef value_type & | reference |
| typedef const value_type & | const_reference |
| typedef qptrdiff | difference_type |
| typedef int | size_type |
Public Member Functions |
|
| QSet () | |
| QSet (const QSet< T > &other) | |
| QSet< T > & | operator= (const QSet< T > &other) |
| bool | operator== (const QSet< T > &other) const |
| bool | operator!= (const QSet< T > &other) const |
| int | size () const |
| bool | isEmpty () const |
| int | capacity () const |
| void | reserve (int size) |
| void | squeeze () |
| void | detach () |
| bool | isDetached () const |
| void | setSharable (bool sharable) |
| void | clear () |
| bool | remove (const T &value) |
| bool | contains (const T &value) const |
| bool | contains (const QSet< T > &set) const |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | constBegin () const |
| iterator | end () |
| const_iterator | end () const |
| const_iterator | constEnd () const |
| iterator | erase (iterator i) |
| int | count () const |
| const_iterator | insert (const T &value) |
| iterator | find (const T &value) |
| const_iterator | find (const T &value) const |
| const_iterator | constFind (const T &value) const |
| QSet< T > & | unite (const QSet< T > &other) |
| QSet< T > & | intersect (const QSet< T > &other) |
| QSet< T > & | subtract (const QSet< T > &other) |
| bool | empty () const |
| QSet< T > & | operator<< (const T &value) |
| QSet< T > & | operator|= (const QSet< T > &other) |
| QSet< T > & | operator|= (const T &value) |
| QSet< T > & | operator&= (const QSet< T > &other) |
| QSet< T > & | operator&= (const T &value) |
| QSet< T > & | operator+= (const QSet< T > &other) |
| QSet< T > & | operator+= (const T &value) |
| QSet< T > & | operator-= (const QSet< T > &other) |
| QSet< T > & | operator-= (const T &value) |
| QSet< T > | operator| (const QSet< T > &other) const |
| QSet< T > | operator& (const QSet< T > &other) const |
| QSet< T > | operator+ (const QSet< T > &other) const |
| QSet< T > | operator- (const QSet< T > &other) const |
| QSet< T > | operator| (const QSet< T > &other) |
| QSet< T > | operator& (const QSet< T > &other) |
| QSet< T > | operator+ (const QSet< T > &other) |
| QSet< T > | operator- (const QSet< T > &other) |
| QList< T > | toList () const |
| QList< T > | values () const |
Static Public Member Functions |
|
| static QSet< T > | fromList (const QList< T > &list) |
| typedef const_iterator ConstIterator |
| typedef T key_type |
| typedef T value_type |
| typedef value_type* pointer |
| typedef const value_type* const_pointer |
| typedef value_type& reference |
| typedef const value_type& const_reference |
| typedef qptrdiff difference_type |
| typedef int size_type |
| bool operator== | ( | const QSet< T > & | other | ) | const [inline] |
| bool operator!= | ( | const QSet< T > & | other | ) | const [inline] |
| int size | ( | ) | const [inline] |
| bool isEmpty | ( | ) | const [inline] |
| int capacity | ( | ) | const [inline] |
| Q_INLINE_TEMPLATE void reserve | ( | int | size | ) | [inline] |
| void squeeze | ( | ) | [inline] |
| void detach | ( | ) | [inline] |
| bool isDetached | ( | ) | const [inline] |
| void setSharable | ( | bool | sharable | ) | [inline] |
| void clear | ( | ) | [inline] |
| bool remove | ( | const T & | value | ) | [inline] |
| bool contains | ( | const T & | value | ) | const [inline] |
| Q_INLINE_TEMPLATE bool contains | ( | const QSet< T > & | set | ) | const |
Definition at line 279 of file qset.h.
{
typename QSet<T>::const_iterator i = other.constBegin();
while (i != other.constEnd()) {
if (!contains(*i))
return false;
++i;
}
return true;
}
| iterator begin | ( | ) | [inline] |
| const_iterator begin | ( | ) | const [inline] |
| const_iterator constBegin | ( | ) | const [inline] |
| iterator end | ( | ) | [inline] |
| const_iterator end | ( | ) | const [inline] |
| const_iterator constEnd | ( | ) | const [inline] |
| int count | ( | ) | const [inline] |
| const_iterator insert | ( | const T & | value | ) | [inline] |
Definition at line 174 of file qset.h.
{ return static_cast<typename Hash::const_iterator>(q_hash.insert(value,
QHashDummyValue())); }
| iterator find | ( | const T & | value | ) | [inline] |
| const_iterator find | ( | const T & | value | ) | const [inline] |
| const_iterator constFind | ( | const T & | value | ) | const [inline] |
Definition at line 239 of file qset.h.
{
QSet<T> copy(other);
typename QSet<T>::const_iterator i = copy.constEnd();
while (i != copy.constBegin()) {
--i;
insert(*i);
}
return *this;
}
Definition at line 251 of file qset.h.
{
QSet<T> copy1(*this);
QSet<T> copy2(other);
typename QSet<T>::const_iterator i = copy1.constEnd();
while (i != copy1.constBegin()) {
--i;
if (!copy2.contains(*i))
remove(*i);
}
return *this;
}
Definition at line 265 of file qset.h.
{
QSet<T> copy1(*this);
QSet<T> copy2(other);
typename QSet<T>::const_iterator i = copy1.constEnd();
while (i != copy1.constBegin()) {
--i;
if (copy2.contains(*i))
remove(*i);
}
return *this;
}
| bool empty | ( | ) | const [inline] |
| QSet<T>& operator<< | ( | const T & | value | ) | [inline] |
| QSet<T>& operator|= | ( | const T & | value | ) | [inline] |
| QSet<T>& operator&= | ( | const T & | value | ) | [inline] |
| QSet<T>& operator+= | ( | const T & | value | ) | [inline] |
| QSet<T>& operator-= | ( | const T & | value | ) | [inline] |
| Q_OUTOFLINE_TEMPLATE QList< T > toList | ( | ) | const |
Definition at line 291 of file qset.h.
{
QList<T> result;
result.reserve(size());
typename QSet<T>::const_iterator i = constBegin();
while (i != constEnd()) {
result.append(*i);
++i;
}
return result;
}
| QList<T> values | ( | ) | const [inline] |