37 #ifndef NVWA_FILE_LINE_READER_H 38 #define NVWA_FILE_LINE_READER_H 60 typedef int difference_type;
61 typedef char* value_type;
62 typedef value_type* pointer_type;
63 typedef value_type& reference;
64 typedef std::input_iterator_tag iterator_category;
66 iterator() _NOEXCEPT : _M_reader(_NULLPTR), _M_line(_NULLPTR) {}
73 #if HAVE_CXX11_RVALUE_REFERENCE 82 assert(_M_reader != _NULLPTR);
85 pointer_type operator->()
87 assert(_M_reader != _NULLPTR);
92 if (!_M_reader->read(_M_line, _M_size, _M_capacity))
103 bool operator==(
const iterator& rhs)
const 105 return _M_reader == rhs._M_reader;
107 bool operator!=(
const iterator& rhs)
const 109 return !operator==(rhs);
112 size_t size()
const {
return _M_size; }
134 bool read(
char*& output,
size_t& size,
size_t& capacity);
142 bool _M_strip_delimiter;
156 #endif // NVWA_FILE_LINE_READER_H void swap(iterator &rhs) noexcept
Swaps the iterator with another.
Definition: file_line_reader.cpp:142
The delimiter should be retained.
Definition: file_line_reader.h:125
void swap(bool_array &lhs, bool_array &rhs) noexcept
Exchanges the content of two bool_arrays.
Definition: bool_array.h:358
Iterator that contains the line content.
Definition: file_line_reader.h:57
strip_type
Enumeration of whether the delimiter should be stripped.
Definition: file_line_reader.h:122
C++11 feature detection macros and workarounds.
Class to allow iteration over all lines of a text file.
Definition: file_line_reader.h:49
The delimiter should be stripped.
Definition: file_line_reader.h:124
Common definitions for preprocessing.