Класс QCollatorSortKey
Класс QCollatorSortKey может быть использован для ускорения сортировки строк. Подробнее...
| Заголовок: | #include <QCollatorSortKey> |
| qmake: | QT += core |
| С момента: | Qt 5.2 |
Этот класс был представлен в Qt 5.2.
Примечание: Все функции в этом классе являются реентерабельными.
Открытые функции
| QCollatorSortKey(const QCollatorSortKey &other) | |
| QCollatorSortKey & | operator=(QCollatorSortKey &&other) |
| QCollatorSortKey & | operator=(const QCollatorSortKey &other) |
| ~QCollatorSortKey() | |
| int | compare(const QCollatorSortKey &otherKey) const |
| void | swap(QCollatorSortKey &other) |
Связанные нечлены
| bool | operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs) |
Подробное описание
Класс QCollatorSortKey всегда создается функцией QCollator::sortKey() и используется для быстрой сортировки строк, например, при сортировке большого числа строк.
См. также QCollator и QCollator::sortKey().
Документация по членам-функциям
QCollatorSortKey::QCollatorSortKey(const QCollatorSortKey &other)
Создает копию ключа сортировщика other.
QCollatorSortKey &QCollatorSortKey::operator=(QCollatorSortKey &&other)
Перемещающее присваивание other этому ключу сортировщика.
QCollatorSortKey &QCollatorSortKey::operator=(const QCollatorSortKey &other)
Присваивает other этому ключу сортировщика.
QCollatorSortKey::~QCollatorSortKey()
Удаляет ключ сортировщика.
int QCollatorSortKey::compare(const QCollatorSortKey &otherKey) const
Сравнивает этот ключ с otherKey.
Возвращает отрицательное значение, если ключ меньше otherKey, 0, если ключи равны, или положительное значение, если ключ больше otherKey.
См. также operator<().
void QCollatorSortKey::swap(QCollatorSortKey &other)
Меняет местами этот ключ сортировщика с other.
Связанные нечлены
bool operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs)
Согласно QCollator, который создал ключи, возвращает true если lhs должен быть отсортирован перед rhs; в противном случае возвращает false.
См. также QCollatorSortKey::compare().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.14/qcollatorsortkey.html