63 { q_hash = other.q_hash;
return *
this; }
64 #ifdef Q_COMPILER_RVALUE_REFS
66 {
qSwap(q_hash, other.q_hash);
return *
this; }
68 inline void swap(
QSet<T> &other) { q_hash.swap(other.q_hash); }
71 {
return q_hash == other.q_hash; }
73 {
return q_hash != other.q_hash; }
75 inline int size()
const {
return q_hash.size(); }
77 inline bool isEmpty()
const {
return q_hash.isEmpty(); }
79 inline int capacity()
const {
return q_hash.capacity(); }
80 inline void reserve(
int size);
81 inline void squeeze() { q_hash.squeeze(); }
83 inline void detach() { q_hash.detach(); }
84 inline bool isDetached()
const {
return q_hash.isDetached(); }
85 inline void setSharable(
bool sharable) { q_hash.setSharable(sharable); }
87 inline void clear() { q_hash.clear(); }
89 inline bool remove(
const T &
value) {
return q_hash.remove(
value) != 0; }
91 inline bool contains(
const T &
value)
const {
return q_hash.contains(value); }
93 bool contains(
const QSet<T> &set)
const;
100 typename Hash::iterator i;
111 inline iterator(
typename Hash::iterator o) : i(o) {}
135 typename Hash::const_iterator i;
173 {
return q_hash.erase(reinterpret_cast<typename Hash::iterator &>(i)); }
178 inline int count()
const {
return q_hash.count(); }
180 {
return static_cast<typename Hash::const_iterator
>(q_hash.insert(value,
199 inline bool empty()
const {
return isEmpty(); }
206 {
QSet<T> result;
if (contains(value)) result.
insert(value);
return (*
this = result); }
212 {
QSet<T> result = *
this; result |= other;
return result; }
214 {
QSet<T> result = *
this; result &= other;
return result; }
216 {
QSet<T> result = *
this; result += other;
return result; }
218 {
QSet<T> result = *
this; result -= other;
return result; }
219 #if QT_VERSION < 0x050000
222 {
QSet<T> result = *
this; result |= other;
return result; }
224 {
QSet<T> result = *
this; result &= other;
return result; }
226 {
QSet<T> result = *
this; result += other;
return result; }
228 {
QSet<T> result = *
this; result -= other;
return result; }
295 template <
typename T>
301 while (i != constEnd()) {
308 template <
typename T>
313 for (
int i = 0; i <
size(); ++i)
318 template <
typename T>
324 template <
typename T>
332 template <typename T>
338 inline bool item_exists()
const {
return c->
constEnd() !=
n; }
348 i = c->
begin(); n = c->
end();
return *
this; }
352 inline const T &
next() { n = i++;
return *
n; }
359 inline const T &
value()
const { Q_ASSERT(item_exists());
return *
n; }
361 {
while (c->
constEnd() != (n = i))
if (*i++ == t)
return true;
return false; }
363 {
while (c->
constBegin() != i)
if (*(n = --i) ==
t)
return true;
364 n = c->
end();
return false; }
GLdouble GLdouble GLdouble r
QSet< T > operator-(const QSet< T > &other)
bool operator!=(const const_iterator &o) const
void swap(QSet< T > &other)
const_iterator & operator-=(int j)
bool operator!=(const QSet< T > &other) const
QSet< T > operator+(const QSet< T > &other)
const_iterator & operator--()
std::bidirectional_iterator_tag iterator_category
iterator & operator+=(int j)
const T & peekPrevious() const
QSet< T > & operator&=(const T &value)
mudbox::Vector & operator<<(mudbox::Vector &v, const HWVector &r)
const_iterator(const iterator &o)
QSet< T > & operator-=(const T &value)
const T & operator*() const
const T * operator->() const
iterator erase(iterator i)
QSet< T > operator-(const QSet< T > &other) const
QSet(const QSet< T > &other)
bool contains(const T &value) const
const_iterator operator--(int)
const_iterator constFind(const T &value) const
const_iterator & operator=(const const_iterator &o)
bool operator!=(const const_iterator &o) const
QSet< T > operator|(const QSet< T > &other) const
bool findPrevious(const T &t)
iterator(const iterator &o)
std::bidirectional_iterator_tag iterator_category
bool operator==(const const_iterator &o) const
QSet< T > & operator|=(const QSet< T > &other)
void setSharable(bool sharable)
iterator find(const T &value)
#define QT_BEGIN_NAMESPACE
#define Q_DECLARE_SEQUENTIAL_ITERATOR(C)
iterator operator-(int j) const
bool operator==(const const_iterator &o) const
const value_type & const_reference
bool operator!=(const iterator &o) const
const_iterator operator+(int j) const
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
QList< T > values() const
QSet< T > & operator-=(const QSet< T > &other)
QList< T > toList() const
QSet< T > & operator=(const QSet< T > &other)
const_iterator constEnd() const
QSet< T > & operator&=(const QSet< T > &other)
iterator(typename Hash::iterator o)
QSet< T > & operator+=(const T &value)
const T & peekNext() const
static QList< T > fromSet(const QSet< T > &set)
QSet< T > & subtract(const QSet< T > &other)
const_iterator operator-(int j) const
GLsizei const GLfloat * value
const_iterator begin() const
QSet< T > operator&(const QSet< T > &other) const
const value_type * const_pointer
QSet< T > & operator|=(const T &value)
const_iterator insert(const T &value)
iterator & operator-=(int j)
const T & operator*() const
const_iterator & operator+=(int j)
iterator & operator=(const iterator &o)
bool operator==(const iterator &o) const
QMutableSetIterator(QSet< T > &container)
QSet< T > & unite(const QSet< T > &other)
QSet< T > operator&(const QSet< T > &other)
static QSet< T > fromList(const QList< T > &list)
const_iterator(typename Hash::const_iterator o)
QSet< T > operator|(const QSet< T > &other)
QSet< T > & operator+=(const QSet< T > &other)
const_iterator & operator++()
QMutableSetIterator & operator=(QSet< T > &container)
const_iterator constBegin() const
const_iterator ConstIterator
iterator operator+(int j) const
QSet< T > operator+(const QSet< T > &other) const
bool operator==(const QSet< T > &other) const
QSet< T > & intersect(const QSet< T > &other)
const_iterator operator++(int)
const_iterator find(const T &value) const
bool findNext(const T &t)
const_iterator(const const_iterator &o)
const_iterator end() const
const T * operator->() const