QDirListing::const_iterator Class
The const_iterator class is the input iterator of a QDirListing. More…
| Header | #include <QDirListing> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Since | 6.8 |
| Nested in | QDirListing |
List of all members, including inherited members
Public Types
| typedef | iterator_category |
| typedef | value_type |
| typedef | difference_type |
| typedef | pointer |
| typedef | reference |
Public Functions
| const_iterator() | |
| reference | operator*() const |
| pointer | operator->() const |
| const_iterator & | operator++() |
| void | operator++(int) |
Detailed Description
An iterator is made by QDirListing::begin() and compared with QDirListing::end(). It can be moved forward and read, which is what a range-based for loop needs.
See also QDirListing::sentinel.
Differences from Qt
None.
Member Type Documentation
typedef QDirListing::const_iterator::difference_type
The type of a distance between iterators.
typedef QDirListing::const_iterator::iterator_category
The category of the iterator: it reads forward, once.
typedef QDirListing::const_iterator::pointer
A pointer to an entry.
typedef QDirListing::const_iterator::reference
A reference to an entry.
typedef QDirListing::const_iterator::value_type
The type the iterator points to.
Member Function Documentation
QDirListing::const_iterator::const_iterator()
Constructs an iterator that is at the end.
reference QDirListing::const_iterator::operator*() const
Returns the entry the iterator is at. The reference is valid until the iterator moves.
const_iterator & QDirListing::const_iterator::operator++()
Moves the iterator to the next entry and returns it. The iterator is equal to QDirListing::end() when there are no more entries.
void QDirListing::const_iterator::operator++(int)
This is an overloaded function.
Moves the iterator to the next entry. As the listing is read once, there is no copy of the iterator at the old position to return.
pointer QDirListing::const_iterator::operator->() const
Returns a pointer to the entry the iterator is at.