46 #if defined(_CC_MSVC_) 47 #pragma warning(disable:4284) // "return type for operator -> is not a UDT" 56 #if defined(Q_TEMPLATEDLL) 187 node =
new Node; node->next = node->prev = node;
nodes = 0;
189 Iterator
e( _p.
node );
201 #if defined(Q_TEMPLATEDLL) 206 NodePtr
p = node->next;
216 NodePtr
p =
new Node( x );
225 Iterator
remove( Iterator it ) {
226 ASSERT ( it.node != node );
227 NodePtr next = it.node->next;
228 NodePtr prev = it.node->prev;
233 return Iterator( next );
236 NodePtr
find( NodePtr start,
const T&
x )
const {
237 ConstIterator first( start );
238 ConstIterator last( node );
239 while( first != last) {
248 ConstIterator first( start );
249 ConstIterator last( node );
251 while( first != last) {
262 Iterator first = Iterator( node->next );
263 Iterator last = Iterator( node );
264 while( first != last) {
272 void remove(
const T&
x ) {
273 Iterator first = Iterator( node->next );
274 Iterator last = Iterator( node );
275 while( first != last) {
277 first =
remove( first );
285 NodePtr
p = node->next;
293 NodePtr
p = node->next;
295 NodePtr next = p->
next;
327 sh->derefAndDelete();
335 for( ConstIterator it = l.
begin(); it != l.
end(); ++it )
342 for( ConstIterator it = l.
begin(); it != l.
end(); ++it )
351 ConstIterator it2 =
begin();
352 ConstIterator it = l.
begin();
353 for( ; it != l.
end(); ++it, ++it2 )
354 if ( !( *it == *it2 ) )
361 Iterator
begin() { detach();
return Iterator( sh->node->next ); }
362 ConstIterator
begin()
const {
return ConstIterator( sh->node->next ); }
363 Iterator
end() { detach();
return Iterator( sh->node ); }
364 ConstIterator
end()
const {
return ConstIterator( sh->node ); }
365 Iterator
fromLast() { detach();
return Iterator( sh->node->prev ); }
366 ConstIterator
fromLast()
const {
return ConstIterator( sh->node->prev ); }
368 bool isEmpty()
const {
return ( sh->nodes == 0 ); }
370 Iterator
insert( Iterator it,
const T&
x ) { detach();
return sh->insert( it, x ); }
372 Iterator
append(
const T&
x ) { detach();
return sh->insert(
end(), x ); }
375 Iterator
remove( Iterator it ) { detach();
return sh->remove( it ); }
376 void remove(
const T&
x ) { detach(); sh->remove(
x ); }
378 T&
first() { detach();
return sh->node->next->data; }
379 const T&
first()
const {
return sh->node->next->data; }
380 T&
last() { detach();
return sh->node->prev->data; }
381 const T&
last()
const {
return sh->node->prev->data; }
383 T& operator[] (
uint i ) { detach();
return sh->at(i)->data; }
384 const T& operator[] (
uint i )
const {
return sh->at(i)->data; }
385 Iterator
at(
uint i ) { detach();
return Iterator( sh->at(i) ); }
386 ConstIterator
at(
uint i )
const {
return ConstIterator( sh->at(i) ); }
387 Iterator
find (
const T&
x ) { detach();
return Iterator( sh->find( sh->node->next, x) ); }
388 ConstIterator
find (
const T&
x )
const {
return ConstIterator( sh->find( sh->node->next, x) ); }
389 Iterator
find ( Iterator it,
const T&
x ) { detach();
return Iterator( sh->find( it.
node, x ) ); }
390 ConstIterator
find ( ConstIterator it,
const T&
x )
const {
return ConstIterator( sh->find( it.
node, x ) ); }
391 int findIndex(
const T&
x )
const {
return sh->findIndex( sh->node->next, x) ; }
423 #ifndef QT_NO_DATASTREAM 440 inline QDataStream& operator<<( QDataStream& s, const QValueList<T>&
l )
444 for( ; it !=
l.end(); ++it )
448 #endif // QT_NO_DATASTREAM 449 #endif // QVALUELIST_H
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
ConstIterator find(const T &x) const
ConstIterator fromLast() const
QValueListIterator< T > operator--(int)
QValueListIterator(NodePtr p)
Iterator prepend(const T &x)
Iterator append(const T &x)
Iterator insert(Iterator it, const T &x)
DoubleProduct & operator+=(DoubleProduct &left, DoubleProduct const &right)
QValueListIterator< T > Iterator
QValueListConstIterator< T > ConstIterator
QValueListNode< T > * NodePtr
Iterator find(const T &x)
QValueListPrivate< T > * sh
QValueListIterator< T > & operator--()
ConstIterator end() const
QValueListIterator< T > Iterator
bool operator!=(ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept
QValueList(const QValueList< T > &l)
QDataStream & operator<<(QDataStream &s, const QValueList< T > &l)
QValueListNode< T > * NodePtr
ConstIterator find(ConstIterator it, const T &x) const
QValueListIterator(const QValueListIterator< T > &it)
QValueListConstIterator(NodePtr p)
bool operator==(const QValueListIterator< T > &it) const
QValueListPrivate(const QValueListPrivate< T > &_p)
bool operator==(const QValueListConstIterator< T > &it) const
uint contains(const T &x) const
const T & operator*() const
int findIndex(const T &x) const
Iterator find(Iterator it, const T &x)
bool operator!=(const QValueListConstIterator< T > &it) const
Iterator insert(Iterator it, const T &x)
uint contains(const T &x) const
QValueListConstIterator< T > & operator++()
QValueListNode(const T &t)
DoubleProduct operator+(DoubleProduct const &left, DoubleProduct const right)
QValueListConstIterator< T > & operator--()
QDataStream & operator>>(QDataStream &s, QValueList< T > &l)
bool operator!=(const QValueListIterator< T > &it) const
QValueListConstIterator(const QValueListConstIterator< T > &it)
QValueListConstIterator()
The QShared struct is internally used for implementing shared classes.
QValueListNode< T > * NodePtr
The QDataStream class provides serialization of binary data to a QIODevice.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
ConstIterator at(uint i) const
QValueListConstIterator< T > operator--(int)
QValueListIterator< T > operator++(int)
QValueListConstIterator< T > ConstIterator
int findIndex(NodePtr start, const T &x) const
NodePtr find(NodePtr start, const T &x) const
QValueListIterator< T > & operator++()
QValueListConstIterator< T > operator++(int)
QValueListNode< T > * prev
QValueListNode< T > * next
QValueListConstIterator(const QValueListIterator< T > &it)
ConstIterator begin() const
const T & operator*() const
bool operator==(ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept