![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtCore More...
#include <qcollator.h>
Public Member Functions | |
QCollatorSortKey (const QCollatorSortKey &other) | |
Constructs a copy of the other collator key. | |
QCollatorSortKey (QCollatorSortKey &&other) noexcept=default | |
~QCollatorSortKey () | |
Destroys the collator key. | |
QCollatorSortKey & | operator= (const QCollatorSortKey &other) |
Assigns other to this collator key. | |
void | swap (QCollatorSortKey &other) noexcept |
\memberswap{collator key} | |
int | compare (const QCollatorSortKey &key) const |
Compares this key to otherKey, which must have been created by the same QCollator's sortKey() as this key. | |
Protected Member Functions | |
QCollatorSortKey (QCollatorSortKeyPrivate *) | |
Protected Attributes | |
QExplicitlySharedDataPointer< QCollatorSortKeyPrivate > | d |
Friends | |
class | QCollator |
bool | operator< (const QCollatorSortKey &lhs, const QCollatorSortKey &rhs) |
Both keys must have been created by the same QCollator's sortKey(). | |
\inmodule QtCore
The QCollatorSortKey class can be used to speed up string collation.
The QCollatorSortKey class is always created by QCollator::sortKey() and is used for fast strings collation, for example when collating many strings.
\reentrant
Definition at line 18 of file qcollator.h.
QCollatorSortKey::QCollatorSortKey | ( | const QCollatorSortKey & | other | ) |
Constructs a copy of the other collator key.
Definition at line 420 of file qcollator.cpp.
|
defaultnoexcept |
QCollatorSortKey::~QCollatorSortKey | ( | ) |
Destroys the collator key.
Definition at line 436 of file qcollator.cpp.
|
protected |
Definition at line 412 of file qcollator.cpp.
int QCollatorSortKey::compare | ( | const QCollatorSortKey & | otherKey | ) | const |
Compares this key to otherKey, which must have been created by the same QCollator's sortKey() as this key.
The comparison is performed in accordance with that QCollator's sort order.
Returns a negative value if this key sorts before otherKey, 0 if the two keys are equal or a positive value if this key sorts after otherKey.
Definition at line 117 of file qcollator_icu.cpp.
QCollatorSortKey & QCollatorSortKey::operator= | ( | const QCollatorSortKey & | other | ) |
Assigns other to this collator key.
Move-assigns other to this QCollatorSortKey instance.
partially-formed
Definition at line 443 of file qcollator.cpp.
|
inlinenoexcept |
\memberswap{collator key}
Definition at line 27 of file qcollator.h.
|
friend |
Both keys must have been created by the same QCollator's sortKey().
Returns true
if lhs should be sorted before rhs, according to the QCollator that created them; otherwise returns false
.
Definition at line 31 of file qcollator.h.
|
friend |
Definition at line 20 of file qcollator.h.
|
protected |
Definition at line 37 of file qcollator.h.