53 #ifndef NVWA_ISTREAM_LINE_READER_H 54 #define NVWA_ISTREAM_LINE_READER_H 76 typedef int difference_type;
77 typedef std::string value_type;
78 typedef value_type* pointer_type;
79 typedef value_type& reference;
80 typedef std::input_iterator_tag iterator_category;
83 explicit iterator(std::istream& is) : _M_stream(&is)
90 assert(_M_stream != _NULLPTR);
93 pointer_type operator->()
95 assert(_M_stream != _NULLPTR);
100 assert(_M_stream != _NULLPTR);
101 getline(*_M_stream, _M_line);
103 _M_stream = _NULLPTR;
113 bool operator==(
const iterator& rhs)
const 115 return _M_stream == rhs._M_stream;
117 bool operator!=(
const iterator& rhs)
const 119 return !operator==(rhs);
123 std::istream* _M_stream;
141 std::istream& _M_stream;
146 #endif // NVWA_ISTREAM_LINE_READER_H Class to allow iteration over all lines from an input stream.
Definition: istream_line_reader.h:66
Iterator that contains the line content.
Definition: istream_line_reader.h:73
C++11 feature detection macros and workarounds.
Common definitions for preprocessing.