werkzeugkiste::files::AsciiFileIterator class
#include <fileio.h>

Public types

using iterator_category = std::forward_iterator_tag
using value_type = std::string
using difference_type = std::ptrdiff_t
using pointer = value_type const*
using reference = value_type const&

Constructors, destructors, conversion operators

~AsciiFileIterator()
AsciiFileIterator(std::string_view filename) explicit
AsciiFileIterator() defaulted
AsciiFileIterator(const AsciiFileIterator&) deleted
AsciiFileIterator(AsciiFileIterator&&) deleted

Public functions

auto operator=(const AsciiFileIterator&) -> AsciiFileIterator& deleted
auto operator=(AsciiFileIterator&&) -> AsciiFileIterator& deleted
auto HasLine() const -> bool
Returns true if there are still lines left to be read from the file.
auto Line() const -> reference
Returns the currently read line.
auto LineNumber() const -> std::size_t
Returns the 0-based number of the currently read line.
auto operator*() const -> reference
Returns the currently read line. Overloaded for convenience.
auto operator->() const -> pointer
Returns a const pointer to the currently read line.
auto Next() -> reference
Advances this iterator to the next line and returns the read line.
auto operator++() -> AsciiFileIterator&
Advances this iterator to the next line.