127 return item1 != item2;
130 #ifndef QT_NO_DATASTREAM 159 #endif // QT_NO_DATASTREAM 225 if ( list.
count() > 0 ) {
288 #if defined(CHECK_RANGE) 289 qWarning(
"QGList::locate: Index %d out of range", index );
298 forward = index > (
uint)curIndex;
299 }
else if ( index <
numNodes - index ) {
459 }
else if ( n->
prev ) {
483 #if defined(CHECK_NULL) 486 qWarning(
"QGList::removeNode: Corrupted node" );
574 #if defined(CHECK_NULL) 577 qWarning(
"QGList::takeNode: Corrupted node" );
694 while ( n && n->
data != d ) {
891 while( r <= last/2 ) {
897 heap[
r ] = heap[ 2*
r ];
908 heap[
r ] = heap[ 2*
r ];
911 }
else if (
compareItems( heap[r], heap[ 2*r+1 ] ) > 0 &&
915 heap[
r ] = heap[ 2*r+1 ];
946 for( ; insert != 0; insert = insert->
next ) {
949 while( i > 1 &&
compareItems( heap[i], heap[ i / 2 ] ) < 0 ) {
951 heap[ i ] = heap[ i/2 ];
959 for (
int i = n; i > 0; i-- ) {
960 insert->
data = heap[1];
961 insert = insert->
next;
976 #ifndef QT_NO_DATASTREAM 979 return list.
read( s );
984 return list.
write( s );
1036 #endif // QT_NO_DATASTREAM 1059 if ( !list->iterators ) {
1060 list->iterators =
new QGList;
1063 list->iterators->append(
this );
1076 list->iterators->append(
this );
1088 list->iterators->removeRef(
this );
1092 list->iterators->append(
this );
1104 list->iterators->removeRef(
this);
1129 #if defined(CHECK_NULL) 1130 qWarning(
"QGListIterator::toFirst: List has been deleted" );
1134 return list->firstNode ? (
curNode = list->firstNode)->getData() : 0;
1145 #if defined(CHECK_NULL) 1146 qWarning(
"QGListIterator::toLast: List has been deleted" );
1150 return list->lastNode ? (
curNode = list->lastNode)->getData() : 0;
uint contains(QCollection::Item) const
QCollection::Item operator++()
virtual Item newItem(Item)
QGListIterator(const QGList &)
void append(QCollection::Item)
QDataStream & read(QDataStream &)
QCollection::Item takeLast()
bool removeAt(uint index)
QCollection::Item getData()
bool removeNode(QLNode *)
void prepend(QCollection::Item)
QDataStream & operator<<(QDataStream &s, const QGList &list)
void heapSortPushDown(QCollection::Item *heap, int first, int last)
QCollection::Item operator-=(uint)
virtual int compareItems(QCollection::Item, QCollection::Item)
void qWarning(const char *msg,...)
uint containsRef(QCollection::Item) const
bool insert(uint index, Item)
bool removeRef(QCollection::Item=0)
QCollection::Item first()
bool resize(uint newsize)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
QCollection::Item takeNode(QLNode *)
QCollection::Item operator()()
QGListIterator & operator=(const QGListIterator &)
The QGList class is an internal class for implementing Qt collection classes.
The QCollection class is the base class of all Qt collections.
The QGVector class is an internal class for implementing Qt collection classes.
QDataStream & write(QDataStream &) const
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
QCollection::Item toLast()
void toVector(QGVector *) const
int findRef(QCollection::Item, bool=TRUE)
QDataStream & operator>>(QDataStream &s, QGList &list)
bool remove(QCollection::Item=0)
void relinkNode(QLNode *)
QCollection::Item operator--()
QCollection::Item operator+=(uint)
The QDataStream class provides serialization of binary data to a QIODevice.
virtual void deleteItem(Item)
QCollection::Item takeFirst()
bool operator==(const QGList &) const
void inSort(QCollection::Item)
The QLNode class is an internal class for the QList template collection.
The QGListIterator class is an internal class for implementing QListIterator.
QGList & operator=(const QGList &)
QCollection::Item toFirst()
QCollection::Item takeAt(uint index)
bool insertAt(uint index, QCollection::Item)
int find(QCollection::Item, bool=TRUE)