QDirListing::const_iterator Class
class QDirListing::const_iterator이 클래스는 Qt 6.8에서 도입되었습니다.
- 상속된 멤버를 포함한 모든 멤버 목록
- const_iterator는 입출력 및 네트워킹의 일부입니다.
공개 유형
공개 함수
| const_iterator() | |
| const_iterator(QDirListing::const_iterator &&) | |
| QDirListing::const_iterator::reference | operator*() const |
| QDirListing::const_iterator & | operator++() |
| void | operator++(int) |
| QDirListing::const_iterator::pointer | operator->() const |
| QDirListing::const_iterator & | operator=(QDirListing::const_iterator &&) |
상세 설명
QDirListing::cbegin()가 반환하는 이터레이터 유형입니다.
- 이는 전진 전용, 단일 통과 이터레이터입니다(디렉터리 항목을 역순으로 반복할 수 없음).
- 복사할 수 없으며, 오직 `
std::move()d`만 가능합니다. std::input_iterator를 모델링하는 객체에 대한 후증가 연산의 반환 값은 부분적으로 형성된 상태(그 이후에 진행된 이터레이터의 복사본)이며, 이러한 객체에 대해 유효한 유일한 연산은 소멸 및 새로운 이터레이터의 할당뿐입니다. 따라서 후증가 연산자는 이터레이터를 진행하고void를 반환합니다.- 임의 접근을 허용하지 않습니다
- 범위 지정 for 루프에서 사용 가능하거나, 임의 접근 이터레이터가 필요하지 않은 C++20 std::ranges 알고리즘과 함께 사용할 수 있습니다
- 유효한 이터레이터를 역참조하면
const DirEntry & - (c)end()는 반복의 끝을 알리는 ` QDirListing::sentinel `를 반환합니다. ` end()`와 동일한 값을 가지는 이터레이터를 역참조하는 것은 정의되지 않은 동작입니다
참고: “고전적인” STL알고리즘은 이터레이터/센티넬을 지원하지 않으므로, ` QDirListing`을 사용하려면 C++20의 `std::ranges` 알고리즘을 사용하거나, C++17에서 범위 기반 알고리즘을 제공하는 타사 라이브러리를 사용해야 합니다.
QDirListing, QDirListing::sentinel 및 QDirListing::DirEntry도 참조하십시오 .
멤버 유형 설명서
[alias] const_iterator::pointer
const QDirListing::DirEntry * 에 대한 typedef입니다.
[alias] const_iterator::reference
const QDirListing::DirEntry & 에 대한 typedef입니다.
멤버 함수 설명서
[constexpr noexcept default] const_iterator::const_iterator()
const_iterator 의 인스턴스를 기본 생성자로 생성합니다.
[constexpr noexcept default] const_iterator::const_iterator(QDirListing::const_iterator &&)
const_iterator 의 인스턴스를 move 생성합니다.
QDirListing::const_iterator::reference const_iterator::operator*() const
이 반복자가 가리키는 디렉터리 항목의 ` const QDirListing::DirEntry & `을 반환합니다.
QDirListing::const_iterator &const_iterator::operator++()
전증가 연산자. 이터레이터를 한 단계 앞으로 이동시키고, 해당 이터레이터에 대한 참조를 반환합니다.
void const_iterator::operator++(int)
후증가 연산자.
QDirListing::const_iterator C++20의 std::input_iterator를 모델링하며, 즉 무작위 액세스를 허용하지 않는 이동 전용, 순방향 전용, 단일 통과 이터레이터입니다.
std::input_iterator 를 구현하는 객체에 대한 후증가 연산자의 반환 값은 부분적으로 형성된 값(이후 진도된 이터레이터의 복사본)이며, 이러한 객체에 대해 유효한 연산은 소멸 및 새로운 이터레이터의 할당뿐입니다. 따라서 후증가 연산자는 이터레이터를 진도시키고 void 를 반환합니다.
QDirListing::const_iterator::pointer const_iterator::operator->() const
이 반복자가 가리키는 디렉터리 항목에 대한 ` const QDirListing::DirEntry * `를 반환합니다.
[constexpr noexcept default] QDirListing::const_iterator &const_iterator::operator=(QDirListing::const_iterator &&)
other 를 이 const_iterator 인스턴스에 할당합니다.
© 2026 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.