QCollatorSortKey Class
QCollatorSortKey 클래스를 사용하여 문자열 데이터 정렬 속도를 높일 수 있습니다. 더 보기...
Header: | #include <QCollatorSortKey> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
- 상속된 멤버를 포함한 모든 멤버의 목록
- QCollatorSortKey는 문자열 데이터용 클래스 및 암시적으로 공유되는 클래스의 일부입니다.
참고: 이 클래스의 모든 함수는 재진입됩니다.
공용 함수
QCollatorSortKey(const QCollatorSortKey &other) | |
(since 6.8) | QCollatorSortKey(QCollatorSortKey &&other) |
~QCollatorSortKey() | |
int | compare(const QCollatorSortKey &otherKey) const |
void | swap(QCollatorSortKey &other) |
QCollatorSortKey & | operator=(QCollatorSortKey &&other) |
QCollatorSortKey & | operator=(const QCollatorSortKey &other) |
관련 비회원
bool | operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs) |
상세 설명
QCollatorSortKey 클래스는 항상 QCollator::sortKey()에 의해 생성되며, 예를 들어 많은 문자열을 정렬할 때와 같이 빠른 문자열 정렬에 사용됩니다.
QCollator, QCollator::sortKey() 및 compare()도 참조하세요 .
멤버 함수 문서
QCollatorSortKey::QCollatorSortKey(const QCollatorSortKey &other)
other 콜레이터 키의 복사본을 생성합니다.
[noexcept, since 6.8]
QCollatorSortKey::QCollatorSortKey(QCollatorSortKey &&other)
Move는 other 에서 새 QCollatorSortKey를 생성합니다.
참고: 이동한 객체 other 는 부분적으로 형성된 상태로 배치되며, 유효한 연산은 파괴와 새 값 할당뿐입니다.
이 함수는 Qt 6.8에 도입되었습니다.
[noexcept]
QCollatorSortKey::~QCollatorSortKey()
콜레이터 키를 삭제합니다.
int QCollatorSortKey::compare(const QCollatorSortKey &otherKey) const
이 키와 동일한 QCollator 의 sortKey()에 의해 생성되어야 하는 otherKey 와 비교합니다. 비교는 QCollator 의 정렬 순서에 따라 수행됩니다.
이 키가 otherKey 보다 먼저 정렬되면 음수 값을, 두 키가 같으면 0을, otherKey 보다 나중에 정렬되면 양수 값을 반환합니다.
operator<()도 참조하세요 .
[noexcept]
void QCollatorSortKey::swap(QCollatorSortKey &other)
이 콜레이터 키를 other 로 바꿉니다. 이 작업은 매우 빠르며 실패하지 않습니다.
[noexcept]
QCollatorSortKey &QCollatorSortKey::operator=(QCollatorSortKey &&other)
이동 - other 을 이 QCollatorSortKey 인스턴스에 할당합니다.
참고: 이동된 other 객체는 부분적으로 형성된 상태로 배치되며, 유효한 작업은 소멸과 새 값 할당뿐입니다.
QCollatorSortKey &QCollatorSortKey::operator=(const QCollatorSortKey &other)
이 콜레이터 키에 other 을 할당합니다.
관련 비회원
bool operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs)
두 키는 모두 동일한 QCollator 의 sortKey()에 의해 생성된 것이어야 합니다. lhs 이 생성한 QCollator 에 따라 rhs 보다 먼저 정렬되어야 하는 경우 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
QCollatorSortKey::compare()도 참조하세요 .
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.