6.0.0-rc4Source

QDirListing::const_iterator Class

The const_iterator class is the input iterator of a QDirListing. More…

Header#include <QDirListing>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
Since6.8
Nested inQDirListing

List of all members, including inherited members

Public Types

typedefiterator_category
typedefvalue_type
typedefdifference_type
typedefpointer
typedefreference

Public Functions

const_iterator()
referenceoperator*() const
pointeroperator->() const
const_iterator &operator++()
voidoperator++(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.