Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Implements the minimum interface for a range-based for loop iterator. More...
#include <filelineiter.h>
Public Types | |
enum | { DEFAULT = 0x0000 , REMOVE_LINEFEED = DEFAULT , KEEP_LINEFEED = 0x0001 , REMOVE_INLINE_CR = 0x0002 , REMOVE_BLANK_LINES = 0x0004 } |
Public Member Functions | |
FileLineIterator (File *file, int options) | |
const std::string & | operator* () const |
bool | operator!= (const FileLineIterator &other) const |
void | operator++ () |
Implements the minimum interface for a range-based for loop iterator.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Allows to read a text file line by line with: for (const std::string& line : FileLines("myfile.txt")) { ... }
More details:
Definition at line 36 of file filelineiter.h.
anonymous enum |
Enumerator | |
---|---|
DEFAULT | |
REMOVE_LINEFEED | |
KEEP_LINEFEED | |
REMOVE_INLINE_CR | |
REMOVE_BLANK_LINES |
Definition at line 38 of file filelineiter.h.
|
inline |
Definition at line 46 of file filelineiter.h.
|
inline |
Definition at line 54 of file filelineiter.h.
|
inline |
Definition at line 53 of file filelineiter.h.
|
inline |
Definition at line 57 of file filelineiter.h.