38 #ifndef NVWA_MMAP_LINE_READER_H 39 #define NVWA_MMAP_LINE_READER_H 58 typedef int difference_type;
59 typedef std::string value_type;
60 typedef value_type* pointer_type;
61 typedef value_type& reference;
62 typedef std::input_iterator_tag iterator_category;
66 : _M_reader(reader) , _M_offset(0) {}
70 assert(_M_reader != _NULLPTR);
73 value_type* operator->()
75 assert(_M_reader != _NULLPTR);
80 if (!_M_reader->read(_M_line, _M_offset))
91 bool operator==(
const iterator& rhs)
const 93 return _M_reader == rhs._M_reader;
95 bool operator!=(
const iterator& rhs)
const 97 return !operator==(rhs);
122 bool read(std::string& output, off_t& offset);
132 bool _M_strip_delimiter;
139 #endif // NVWA_MMAP_LINE_READER_H Iterator that contains the line content.
Definition: mmap_line_reader.h:55
The delimiter should be stripped.
Definition: mmap_line_reader.h:109
Class to allow iteration over all lines of a mmappable file.
Definition: mmap_line_reader.h:51
strip_type
Enumeration of whether the delimiter should be stripped.
Definition: mmap_line_reader.h:107
C++11 feature detection macros and workarounds.
The delimiter should be retained.
Definition: mmap_line_reader.h:110
Common definitions for preprocessing.